diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-12-03 03:49:44 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-12-03 03:49:44 +0000 |
commit | 0fd8fae0a68fc1693022e5bee9ed6f20a552efb2 (patch) | |
tree | 4eeed6675e32cdce09587d59e89906192256c619 /clang/test/Index/get-cursor.cpp | |
parent | 3b107b172d51a80429dc6a7e2abb419eff3992fa (diff) | |
download | bcm5719-llvm-0fd8fae0a68fc1693022e5bee9ed6f20a552efb2.tar.gz bcm5719-llvm-0fd8fae0a68fc1693022e5bee9ed6f20a552efb2.zip |
[libclang] Allow indexing/get-cursor/etc. for the exception variable in a C++ catch.
llvm-svn: 145750
Diffstat (limited to 'clang/test/Index/get-cursor.cpp')
-rw-r--r-- | clang/test/Index/get-cursor.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Index/get-cursor.cpp b/clang/test/Index/get-cursor.cpp index 441ed1cdabe..db27c241fd6 100644 --- a/clang/test/Index/get-cursor.cpp +++ b/clang/test/Index/get-cursor.cpp @@ -33,6 +33,11 @@ struct YDerived : Y { void test() { X foo; + + try { + } catch (X e) { + X x; + } } // RUN: c-index-test -cursor-at=%s:6:4 %s | FileCheck -check-prefix=CHECK-COMPLETION-1 %s @@ -80,3 +85,7 @@ void test() { // RUN: c-index-test -cursor-at=%s:21:3 %s | FileCheck -check-prefix=CHECK-MEMBER %s // CHECK-MEMBER: FieldDecl=member:21:7 (Definition) // CHECK-MEMBER-NEXT: Completion string: {ResultType int}{TypedText member} + +// RUN: c-index-test -cursor-at=%s:38:12 -cursor-at=%s:39:5 %s | FileCheck -check-prefix=CHECK-CXXCATCH %s +// CHECK-CXXCATCH: TypeRef=struct X:3:8 +// CHECK-CXXCATCH-NEXT: TypeRef=struct X:3:8 |