summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/annotate-nested-name-specifier.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-02-25 18:19:59 +0000
committerDouglas Gregor <dgregor@apple.com>2011-02-25 18:19:59 +0000
commita6ce608b97d6443f8e47f3cb20354be7b0cdeb43 (patch)
tree50a9d4a605b7d5ae5a1ba6e1ca869fc1a91dd00f /clang/test/Index/annotate-nested-name-specifier.cpp
parent40c5e1ada70f0a8d69c741c048d218634cc588dd (diff)
downloadbcm5719-llvm-a6ce608b97d6443f8e47f3cb20354be7b0cdeb43.tar.gz
bcm5719-llvm-a6ce608b97d6443f8e47f3cb20354be7b0cdeb43.zip
Push nested-name-specifier source-location information into
pseudo-destructor expressions. Also, clean up some template-instantiation and type-checking issues with pseudo-destructors. llvm-svn: 126498
Diffstat (limited to 'clang/test/Index/annotate-nested-name-specifier.cpp')
-rw-r--r--clang/test/Index/annotate-nested-name-specifier.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/clang/test/Index/annotate-nested-name-specifier.cpp b/clang/test/Index/annotate-nested-name-specifier.cpp
index 216fc4ec9c7..70d84889e99 100644
--- a/clang/test/Index/annotate-nested-name-specifier.cpp
+++ b/clang/test/Index/annotate-nested-name-specifier.cpp
@@ -51,7 +51,14 @@ namespace outer {
using namespace outer_alias::inner::secret;
namespace super_secret = outer_alias::inner::secret;
-// RUN: c-index-test -test-annotate-tokens=%s:13:1:53:1 %s | FileCheck %s
+template<typename T>
+struct X3 {
+ void f(T *t) {
+ t->::outer_alias::inner::template vector<T>::~vector<T>();
+ }
+};
+
+// RUN: c-index-test -test-annotate-tokens=%s:13:1:60: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
@@ -120,3 +127,24 @@ namespace super_secret = outer_alias::inner::secret;
// CHECK: Identifier: "secret" [52:46 - 52:52] NamespaceRef=secret:46:15
// CHECK: Punctuation: ";" [52:52 - 52:53]
+// Pseudo-destructor
+// CHECK: Identifier: "t" [57:5 - 57:6] DeclRefExpr=t:56:13
+// CHECK: Punctuation: "->" [57:6 - 57:8] UnexposedExpr=
+// CHECK: Punctuation: "::" [57:8 - 57:10] UnexposedExpr=
+// CHECK: Identifier: "outer_alias" [57:10 - 57:21] NamespaceRef=outer_alias:10:11
+// CHECK: Punctuation: "::" [57:21 - 57:23] UnexposedExpr=
+// CHECK: Identifier: "inner" [57:23 - 57:28] NamespaceRef=inner:45:13
+// CHECK: Punctuation: "::" [57:28 - 57:30] UnexposedExpr=
+// CHECK: Keyword: "template" [57:30 - 57:38] UnexposedExpr=
+// CHECK: Identifier: "vector" [57:39 - 57:45] TemplateRef=vector:4:12
+// CHECK: Punctuation: "<" [57:45 - 57:46] UnexposedExpr=
+// CHECK: Identifier: "T" [57:46 - 57:47] UnexposedExpr=
+// CHECK: Punctuation: ">" [57:47 - 57:48] UnexposedExpr=
+// CHECK: Punctuation: "::" [57:48 - 57:50] UnexposedExpr=
+// CHECK: Punctuation: "~" [57:50 - 57:51] UnexposedExpr=
+// CHECK: Identifier: "vector" [57:51 - 57:57] TemplateRef=vector:4:12
+// CHECK: Punctuation: "<" [57:57 - 57:58] UnexposedExpr=
+// CHECK: Identifier: "T" [57:58 - 57:59] UnexposedExpr=
+// CHECK: Punctuation: ">" [57:59 - 57:60] UnexposedExpr=
+// CHECK: Punctuation: "(" [57:60 - 57:61] CallExpr=
+// CHECK: Punctuation: ")" [57:61 - 57:62] CallExpr=
OpenPOWER on IntegriCloud