emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/merge-cedet-tests 75c52c3 055/316: (ms_structs, fu


From: Edward John Steere
Subject: [Emacs-diffs] scratch/merge-cedet-tests 75c52c3 055/316: (ms_structs, fun): New test example from Marting Stein.
Date: Sat, 28 Jan 2017 09:09:47 +0000 (UTC)

branch: scratch/merge-cedet-tests
commit 75c52c3f59b7f50a6144f58dfe9be615ab0e08dc
Author: Eric Ludlam <address@hidden>
Commit: Edward John Steere <address@hidden>

    (ms_structs, fun): New test example from Marting Stein.
---
 test/manual/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 f2ed0e4..2557ed9 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 <address@hidden>
+// 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]