diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-02-25 02:25:35 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-02-25 02:25:35 +0000 |
commit | 144548072d38ab9ad76ed40674482df4704a0d43 (patch) | |
tree | 30eac55ddfdf1dfed7431700699535844aa332e8 /clang/test/Index/annotate-nested-name-specifier.cpp | |
parent | 0e65ce3de82cc69cd2cb0d37c8198d873ca7ddde (diff) | |
download | bcm5719-llvm-144548072d38ab9ad76ed40674482df4704a0d43.tar.gz bcm5719-llvm-144548072d38ab9ad76ed40674482df4704a0d43.zip |
Use NestedNameSpecifierLoc within out-of-line variables, function, and
tag definitions. Also, add support for template instantiation of
NestedNameSpecifierLocs.
llvm-svn: 126470
Diffstat (limited to 'clang/test/Index/annotate-nested-name-specifier.cpp')
-rw-r--r-- | clang/test/Index/annotate-nested-name-specifier.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/clang/test/Index/annotate-nested-name-specifier.cpp b/clang/test/Index/annotate-nested-name-specifier.cpp index 13bcc98db5f..6b2c9c4664a 100644 --- a/clang/test/Index/annotate-nested-name-specifier.cpp +++ b/clang/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. |