summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-08-15 22:40:24 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-08-15 22:40:24 +0000
commit2c7f4f133f1a224ffc5837560ff1ec96864226df (patch)
tree9aca09e7d17819456b33025537b5bc69c344b825 /clang/test
parentbf005ecd9c4d791b8fd2595bd970644dff951a9f (diff)
downloadbcm5719-llvm-2c7f4f133f1a224ffc5837560ff1ec96864226df.tar.gz
bcm5719-llvm-2c7f4f133f1a224ffc5837560ff1ec96864226df.zip
[libclang] Require explicit cursor visitation for all TypeLocs (compilation will
fail if a TypeLoc kind is not handled) and handle DecltypeTypeLoc and InjectedClassNameTypeLoc. llvm-svn: 137670
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Index/annotate-tokens-cxx0x.cpp8
-rw-r--r--clang/test/Index/recursive-cxx-member-calls.cpp2
2 files changed, 9 insertions, 1 deletions
diff --git a/clang/test/Index/annotate-tokens-cxx0x.cpp b/clang/test/Index/annotate-tokens-cxx0x.cpp
index 5dea3514c2b..bf86f325fbf 100644
--- a/clang/test/Index/annotate-tokens-cxx0x.cpp
+++ b/clang/test/Index/annotate-tokens-cxx0x.cpp
@@ -3,6 +3,14 @@ int f(Args ...args) {
return sizeof...(args) + sizeof...(Args);
}
+void test() {
+ int a;
+ decltype(a) b;
+}
+
// RUN: c-index-test -test-annotate-tokens=%s:1:1:5:1 -std=c++0x %s | FileCheck %s
// CHECK: Identifier: "args" [3:20 - 3:24] UnexposedExpr=args:2:15
// CHECK: Identifier: "Args" [3:38 - 3:42] TypeRef=Args:1:22
+
+// RUN: c-index-test -test-annotate-tokens=%s:8:1:9:1 -std=c++0x %s | FileCheck -check-prefix=CHECK-DECLTYPE %s
+// CHECK-DECLTYPE: Identifier: "a" [8:12 - 8:13] DeclRefExpr=a:7:7
diff --git a/clang/test/Index/recursive-cxx-member-calls.cpp b/clang/test/Index/recursive-cxx-member-calls.cpp
index 7502c8f47b4..f42e6a36370 100644
--- a/clang/test/Index/recursive-cxx-member-calls.cpp
+++ b/clang/test/Index/recursive-cxx-member-calls.cpp
@@ -846,7 +846,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK-tokens: Keyword: "unsigned" [88:14 - 88:22] NonTypeTemplateParameter=N:88:23 (Definition)
// CHECK-tokens: Identifier: "N" [88:23 - 88:24] NonTypeTemplateParameter=N:88:23 (Definition)
// CHECK-tokens: Punctuation: ">" [88:25 - 88:26] FunctionTemplate=Case:88:42 (Definition)
-// CHECK-tokens: Identifier: "StringSwitch" [88:27 - 88:39] FunctionTemplate=Case:88:42 (Definition)
+// CHECK-tokens: Identifier: "StringSwitch" [88:27 - 88:39] TypeRef=StringSwitch<T, R>:83:47
// CHECK-tokens: Punctuation: "&" [88:40 - 88:41] FunctionTemplate=Case:88:42 (Definition)
// CHECK-tokens: Identifier: "Case" [88:42 - 88:46] FunctionTemplate=Case:88:42 (Definition)
// CHECK-tokens: Punctuation: "(" [88:46 - 88:47] FunctionTemplate=Case:88:42 (Definition)
OpenPOWER on IntegriCloud