From: David Engster Date: Sun, 15 Sep 2013 09:19:30 +0000 (+0200) Subject: Another 'using namespace' fix X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ebff99d71b84ba61ab3e0f65f56ec4019c210f54;p=emacs.git Another 'using namespace' fix (semantic-analyze-scoped-types-default): If we cannot find a type in the typecache, also look into the the types we already found. This is necessary since in C++, a 'using namespace' can be dependend on a previous one. * testusing.cpp: Add test for the above. --- diff --git a/test/manual/cedet/cedet/semantic/tests/testusing.cpp b/test/manual/cedet/cedet/semantic/tests/testusing.cpp index 4dd42a3b5b7..564591d6db9 100644 --- a/test/manual/cedet/cedet/semantic/tests/testusing.cpp +++ b/test/manual/cedet/cedet/semantic/tests/testusing.cpp @@ -193,3 +193,16 @@ void unfoundfunc() ; //#17# ( ) Nothing here since this is an undefined class } + +// Using statements can depend on previous ones... + +void acc_using() +{ + using namespace outer; + // This is effectively like 'using namespace outer::inner' + using namespace inner; + + StructNested sn; + sn.//-18- + ; //#18# ( "one" "two" ) +}