From ebff99d71b84ba61ab3e0f65f56ec4019c210f54 Mon Sep 17 00:00:00 2001 From: David Engster Date: Sun, 15 Sep 2013 11:19:30 +0200 Subject: [PATCH] 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. --- .../manual/cedet/cedet/semantic/tests/testusing.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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" ) +} -- 2.39.2