diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-12 22:41:29 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-12 22:41:29 +0000 |
commit | 1d5d0b9df6d2a3df338bc3e63000536406e7666c (patch) | |
tree | 7986c81096111348632c4f5df0cecaae315322c8 /test/Index/load-stmts.cpp | |
parent | 9370c8f4af43a98a6f16e65f5d88d58db846e374 (diff) |
Add the location of the right parenthesis of a C++ named cast
(static_cast, dynamic_cast, reinterpret_cast, or const_cast) to
improve source-location information. Fixes PR8960.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123336 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/load-stmts.cpp')
-rw-r--r-- | test/Index/load-stmts.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Index/load-stmts.cpp b/test/Index/load-stmts.cpp index 6f01c1343b..323b778faf 100644 --- a/test/Index/load-stmts.cpp +++ b/test/Index/load-stmts.cpp @@ -113,6 +113,10 @@ void considered_harmful(int x) { goto start_over; } +void casts(int *ip) { + (void)reinterpret_cast<float *>(ip); +} + // RUN: c-index-test -test-load-source all %s | FileCheck %s // CHECK: load-stmts.cpp:1:13: TypedefDecl=T:1:13 (Definition) Extent=[1:13 - 1:14] // CHECK: load-stmts.cpp:2:8: StructDecl=X:2:8 (Definition) Extent=[2:1 - 2:23] @@ -221,3 +225,5 @@ void considered_harmful(int x) { // CHECK: load-stmts.cpp:108:2: LabelStmt=start_over Extent=[108:2 - 109:28] // CHECK: load-stmts.cpp:109:17: LabelRef=start_over:108:2 Extent=[109:17 - 109:27] // CHECK: load-stmts.cpp:113:10: LabelRef=start_over:108:2 Extent=[113:10 - 113:20] +// CHECK: load-stmts.cpp:117:9: UnexposedExpr=ip:116:17 Extent=[117:9 - 117:38] + |