aboutsummaryrefslogtreecommitdiff
path: root/test/Index/annotate-nested-name-specifier.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-02-25 02:25:35 +0000
committerDouglas Gregor <dgregor@apple.com>2011-02-25 02:25:35 +0000
commitc22b5fff39a7520207f165fb16a27a34b944bd9c (patch)
treec79ab64b51bd9c1b5fe807aa689003dc23d2f128 /test/Index/annotate-nested-name-specifier.cpp
parent7decebfc7b9dc841f228c93cc2e41e3e62911ff8 (diff)
Use NestedNameSpecifierLoc within out-of-line variables, function, and
tag definitions. Also, add support for template instantiation of NestedNameSpecifierLocs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126470 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/annotate-nested-name-specifier.cpp')
-rw-r--r--test/Index/annotate-nested-name-specifier.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/test/Index/annotate-nested-name-specifier.cpp b/test/Index/annotate-nested-name-specifier.cpp
index 13bcc98db5..6b2c9c4664 100644
--- a/test/Index/annotate-nested-name-specifier.cpp
+++ b/test/Index/annotate-nested-name-specifier.cpp
@@ -17,9 +17,24 @@ struct X_vector : outer_alias::inner::vector<X> {
using outer_alias::inner::vector<X>::iterator;
};
+namespace outer {
+ namespace inner {
+ template<typename T, unsigned N>
+ struct array {
+ void foo();
+ static int max_size;
+ };
+ }
+}
+
+template<typename T, unsigned N>
+void outer::inner::array<T, N>::foo() {
+}
+template<typename T, unsigned N>
+int outer::inner::array<T, N>::max_size = 17;
-// RUN: c-index-test -test-annotate-tokens=%s:13:1:19:1 %s | FileCheck %s
+// RUN: c-index-test -test-annotate-tokens=%s:13:1:36:1 %s | FileCheck %s
// CHECK: Keyword: "using" [14:1 - 14:6] UsingDeclaration=vector[4:12]
// CHECK: Identifier: "outer_alias" [14:7 - 14:18] NamespaceRef=outer_alias:10:11
@@ -40,3 +55,5 @@ struct X_vector : outer_alias::inner::vector<X> {
// CHECK: Punctuation: ">" [17:37 - 17:38] UsingDeclaration=iterator[5:18]
// CHECK: Punctuation: "::" [17:38 - 17:40] UsingDeclaration=iterator[5:18]
// CHECK: Identifier: "iterator" [17:40 - 17:48] OverloadedDeclRef=iterator[5:18]
+
+// FIXME: Check nested-name-specifiers on VarDecl, CXXMethodDecl.