From 2c7f4f133f1a224ffc5837560ff1ec96864226df Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Mon, 15 Aug 2011 22:40:24 +0000 Subject: [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 --- clang/test/Index/annotate-tokens-cxx0x.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'clang/test/Index/annotate-tokens-cxx0x.cpp') 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 -- cgit v1.2.3