summaryrefslogtreecommitdiff
path: root/test/lisp/cedet/semantic-utest-ia-resources/testfriends.cpp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-08-19 16:48:59 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-08-19 16:48:59 -0700
commit07fcbb558d797272b9f43547da60beda485873a3 (patch)
tree77d5da14e9f9d9d8b1d877c70c01296fd3893796 /test/lisp/cedet/semantic-utest-ia-resources/testfriends.cpp
parentc9bdeff3e45a7ac84a74a81bb048046f82dddc91 (diff)
parentfb81c8c3adf8633f2f617c82f6019aef630860c7 (diff)
downloademacs-07fcbb558d797272b9f43547da60beda485873a3.tar.gz
Merge remote-tracking branch 'origin/master' into athena/unstable
Diffstat (limited to 'test/lisp/cedet/semantic-utest-ia-resources/testfriends.cpp')
-rw-r--r--test/lisp/cedet/semantic-utest-ia-resources/testfriends.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/testfriends.cpp b/test/lisp/cedet/semantic-utest-ia-resources/testfriends.cpp
new file mode 100644
index 00000000000..f84ed5a2190
--- /dev/null
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testfriends.cpp
@@ -0,0 +1,37 @@
+// Test parsing of friends and how they are used in completion.
+/*
+ >> Thanks Damien Profeta for the nice example.
+ >
+ > I paste a small example.
+ > It would be great if friend can be well parsed and even greater if
+ > class B can access to all the members of A.
+*/
+
+class Af // %2% ( ( "testfriends.cpp" ) ( "Af" "B::testB" ) )
+{
+public:
+ int pubVar;
+private:
+ int privateVar;
+
+ friend class B;
+
+};
+
+class B
+{
+public:
+ int testB();
+ int testAB();
+
+};
+
+
+int B::testB() {
+ Af classA;
+ classA.//-1-
+ ; //#1# ( "privateVar" "pubVar" )
+}
+
+int B::testAB() { // %1% ( ( "testfriends.cpp" ) ( "B" "B::testAB" ) )
+}