From 75c52c3f59b7f50a6144f58dfe9be615ab0e08dc Mon Sep 17 00:00:00 2001 From: Eric Ludlam Date: Sun, 22 Mar 2015 17:36:44 -0400 Subject: [PATCH] (ms_structs, fun): New test example from Marting Stein. --- .../cedet/cedet/semantic/tests/testnsp.cpp | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/test/manual/cedet/cedet/semantic/tests/testnsp.cpp b/test/manual/cedet/cedet/semantic/tests/testnsp.cpp index f2ed0e4af39..2557ed9d840 100644 --- a/test/manual/cedet/cedet/semantic/tests/testnsp.cpp +++ b/test/manual/cedet/cedet/semantic/tests/testnsp.cpp @@ -57,3 +57,47 @@ void AAA::aaa() d->// -2- ; // #2# ( "bbb" ) } + +// #include files inside a namespace +// David Engster +// See revisions 8034-8037 which implement this. + +namespace another { + #include "testdoublens.hpp" +} + +void foo(void) { + + another::// -3- + ; // #3# ( "Name1" "a" "stage3_Foo" ) + + another::Name1::Name2::Foo a; + + a.// -4- + ; // #4# ( "Mumble" "get" ) +} + +// What happens if a type your looking for is scoped withing a type, +// but you are one level into the completion so the originating scope +// excludes the type of the variable you are completing through? +// Thanks Martin Stein for this nice example. +namespace ms_structs +{ + struct aaa + { + int xx; + }; + struct bbb + { + struct aaa yy; + }; +} +int fun() +{ + using namespace ms_structs; + struct bbb zz; + int uu = zz.// -5- + ; // #5# ( "yy" ) + int kk = zz.yy.// -6- + ; // #6# ( "xx" ) +} \ No newline at end of file -- 2.39.2