From: Eric Ludlam Date: Sun, 22 Mar 2015 21:36:44 +0000 (-0400) Subject: (ms_structs, fun): New test example from Marting Stein. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=75c52c3f59b7f50a6144f58dfe9be615ab0e08dc;p=emacs.git (ms_structs, fun): New test example from Marting Stein. --- 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