From c22b5fff39a7520207f165fb16a27a34b944bd9c Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 25 Feb 2011 02:25:35 +0000 Subject: 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 --- test/Index/annotate-nested-name-specifier.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'test/Index/annotate-nested-name-specifier.cpp') 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 { using outer_alias::inner::vector::iterator; }; +namespace outer { + namespace inner { + template + struct array { + void foo(); + static int max_size; + }; + } +} + +template +void outer::inner::array::foo() { +} +template +int outer::inner::array::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 { // 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. -- cgit v1.2.3-18-g5258