]> git.eshelyaron.com Git - emacs.git/commitdiff
C/C++: Parse 'using' statements in the correct order.
authorDavid Engster <dengste@eml.cc>
Wed, 18 Sep 2013 19:44:03 +0000 (21:44 +0200)
committerEdward John Steere <edward.steere@gmail.com>
Wed, 25 Jan 2017 17:28:21 +0000 (19:28 +0200)
(c++-mode:semantic-ctxt-scoped-types): In the case for using
statements outside of function scope, append them in the correct order
instead of using 'cons'.  This is important since using statements may
depend on previous ones.

* tests/cedet/semantic/test/manual/cedet/testusing.cpp: Add test for
  the above.

test/manual/cedet/cedet/semantic/tests/testusing.cpp

index 564591d6db96f9f51ff9e7cd72a9f1e3d2fd89ff..4fa26872ab55e004cb91ab87959775b84884018c 100644 (file)
@@ -206,3 +206,15 @@ void acc_using()
   sn.//-18-
     ; //#18# ( "one" "two" )
 }
+
+// Check the same outside of function scope
+
+using namespace outer;
+using namespace inner;
+
+void acc_using2()
+{
+  StructNested sn;
+  sn.//-19-
+    ; //#19# ( "one" "two" )
+}