[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/merge-cedet-tests 1d09e4c 217/316: C++: Deal with
From: |
Edward John Steere |
Subject: |
[Emacs-diffs] scratch/merge-cedet-tests 1d09e4c 217/316: C++: Deal with 'using' statements when calculating scope |
Date: |
Fri, 27 Jan 2017 20:03:41 +0000 (UTC) |
branch: scratch/merge-cedet-tests
commit 1d09e4c12c782a3488c1ff76eb0955f5fdd26093
Author: David Engster <address@hidden>
Commit: Edward John Steere <address@hidden>
C++: Deal with 'using' statements when calculating scope
* semantic/bovine/c.el (semantic-ctxt-scoped-types): Go through all
tags around point and search them for using statements. Before, we
skipped the last one thinking that it would have to be function, but
it could also be a type.
* semantic/scope.el (semantic-completable-tags-from-type): When
creating the list of completable types, pull in types which are
referenced through 'using' statements.
* tests/cedet/semantic/test/manual/cedet/testusing.cpp:
* tests/cedet/semantic/test/manual/cedet/testusing.hh: Add tests for
the above.
---
.../cedet/cedet/semantic/tests/testusing.cpp | 25 ++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/test/manual/cedet/cedet/semantic/tests/testusing.cpp
b/test/manual/cedet/cedet/semantic/tests/testusing.cpp
index 4fa2687..f7135d1 100644
--- a/test/manual/cedet/cedet/semantic/tests/testusing.cpp
+++ b/test/manual/cedet/cedet/semantic/tests/testusing.cpp
@@ -218,3 +218,28 @@ void acc_using2()
sn.//-19-
; //#19# ( "one" "two" )
}
+
+// Check if scope gets correctly generated, i.e., without us providing any
+// hints in the form of an existing type
+
+void check_scope()
+{
+ using namespace first;
+ AAA//-20-
+ ; //#20# ( "AAA1" "AAA2" )
+}
+
+void check_scope2()
+{
+ using namespace third;
+ AAA//-21-
+ ; //#21# ( "AAA1" "AAA2" "AAA3" )
+}
+
+// Make sure this also works not only in functions
+
+namespace check_scope3 {
+ using namespace first;
+ AAA//-22-
+ ; //#22# ( "AAA1" "AAA2" )
+}
- [Emacs-diffs] scratch/merge-cedet-tests 5ef7a99 157/316: tests: Fix typo in ede/detect-utest, (continued)
- [Emacs-diffs] scratch/merge-cedet-tests 5ef7a99 157/316: tests: Fix typo in ede/detect-utest, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 876d3e9 138/316: New EDE project for testing dirmatch features., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 49b4ce7 213/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 2f8e8c8 272/316: Remove eieio bits and only use eieio bits for make types, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests e9c9716 279/316: Fixes for external db tests, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests bef87bf 290/316: Make unit tests use randomized file names, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 101da66 306/316: Don't scan other files because Util.cc is already in a buffer, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests a60b900 267/316: Fix provide., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests ab1acb9 300/316: Test refactor/move, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 446edba 291/316: Base template for cit testing., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 1d09e4c 217/316: C++: Deal with 'using' statements when calculating scope,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests 07892f6 287/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 9767368 308/316: Synchronize cedet/semantic with Emacs., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 7f7d6bf 229/316: Synchronize cedet/srecode with Emacs., Edward John Steere, 2017/01/27