diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-08-15 22:40:24 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-08-15 22:40:24 +0000 |
commit | 427964e15f1b9595659cea3fcb4dd808a00f37b5 (patch) | |
tree | 9ee3254e03346725faad3c7169520bcffb595234 /test/Index/annotate-tokens-cxx0x.cpp | |
parent | 041087caec03e8855770695d3eabc0feb031f6ed (diff) |
[libclang] Require explicit cursor visitation for all TypeLocs (compilation will
fail if a TypeLoc kind is not handled) and handle DecltypeTypeLoc and InjectedClassNameTypeLoc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137670 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/annotate-tokens-cxx0x.cpp')
-rw-r--r-- | test/Index/annotate-tokens-cxx0x.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Index/annotate-tokens-cxx0x.cpp b/test/Index/annotate-tokens-cxx0x.cpp index 5dea3514c2..bf86f325fb 100644 --- a/test/Index/annotate-tokens-cxx0x.cpp +++ b/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 |