From 29a51657a7cb49a4063b40c4f1adbcc81f871e3d Mon Sep 17 00:00:00 2001 From: David Engster Date: Wed, 18 Sep 2013 21:44:03 +0200 Subject: [PATCH] C/C++: Parse 'using' statements in the correct order. (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 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/manual/cedet/cedet/semantic/tests/testusing.cpp b/test/manual/cedet/cedet/semantic/tests/testusing.cpp index 564591d6db9..4fa26872ab5 100644 --- a/test/manual/cedet/cedet/semantic/tests/testusing.cpp +++ b/test/manual/cedet/cedet/semantic/tests/testusing.cpp @@ -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" ) +} -- 2.39.2