diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-11-05 21:11:19 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-11-05 21:11:19 +0000 |
commit | 93798e25d68e2d146cff9bd0355d4b7b1ca765f1 (patch) | |
tree | b19d33d3fe72a46968e0d8dcccd457c3cd733457 /test/Index/get-cursor.cpp | |
parent | 752c2e930a3ec30b5e338845fd5e7baae532ee69 (diff) |
Teach clang_getCursorReferenced() that a
CXXConstructorExpr/CXXTemporaryObjectExpr references the constructor
it calls. Then, tweak clang_getCursor() to prefer such a call over a
type reference to the type being called.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118297 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/get-cursor.cpp')
-rw-r--r-- | test/Index/get-cursor.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/Index/get-cursor.cpp b/test/Index/get-cursor.cpp index a1974b63a5..ae39e63fcc 100644 --- a/test/Index/get-cursor.cpp +++ b/test/Index/get-cursor.cpp @@ -23,8 +23,11 @@ X getX(int value) { // RUN: c-index-test -cursor-at=%s:14:23 %s | FileCheck -check-prefix=CHECK-VALUE-REF %s // CHECK-VALUE-REF: DeclRefExpr=value:10:12 -// FIXME: c-index-test -cursor-at=%s:12:18 %s | FileCheck -check-prefix=CHECK-TYPE-REF %s -// RUN: c-index-test -cursor-at=%s:13:18 %s | FileCheck -check-prefix=CHECK-TYPE-REF %s -// FIXME: c-index-test -cursor-at=%s:14:19 %s | FileCheck -check-prefix=CHECK-TYPE-REF %s -// RUN: c-index-test -cursor-at=%s:17:10 %s | FileCheck -check-prefix=CHECK-TYPE-REF %s +// RUN: c-index-test -cursor-at=%s:12:18 %s | FileCheck -check-prefix=CHECK-CONSTRUCTOR1 %s +// RUN: c-index-test -cursor-at=%s:13:18 %s | FileCheck -check-prefix=CHECK-CONSTRUCTOR2 %s +// RUN: c-index-test -cursor-at=%s:14:19 %s | FileCheck -check-prefix=CHECK-CONSTRUCTOR1 %s +// RUN: c-index-test -cursor-at=%s:17:10 %s | FileCheck -check-prefix=CHECK-CONSTRUCTOR3 %s // CHECK-TYPE-REF: TypeRef=struct X:3:8 +// CHECK-CONSTRUCTOR1: CallExpr=X:5:3 +// CHECK-CONSTRUCTOR2: CallExpr=X:6:3 +// CHECK-CONSTRUCTOR3: CallExpr=X:4:3 |