summaryrefslogtreecommitdiffstats
path: root/test/Index/cindex-on-invalid.m
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-04-20 21:16:21 +0000
committerDouglas Gregor <dgregor@apple.com>2011-04-20 21:16:21 +0000
commitffcd985dcbff204108f37dea5b9fe4e6709e965d (patch)
treef925f3879ef8b8f11447aed4946c43a042e687ab /test/Index/cindex-on-invalid.m
parent285dc6530b37d632cd858bac444d29044de4d283 (diff)
When translating a Clang source range into a libclang source range,
adjust the a ending macro location to the end of the instantiation location before adjusting it to the end of the token. Fixes <rdar://problem/9021561>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/cindex-on-invalid.m')
-rw-r--r--test/Index/cindex-on-invalid.m10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/Index/cindex-on-invalid.m b/test/Index/cindex-on-invalid.m
index d223c2ad59..6eff24baf8 100644
--- a/test/Index/cindex-on-invalid.m
+++ b/test/Index/cindex-on-invalid.m
@@ -6,8 +6,16 @@ void test() {
}
int foo;
+
+#define NO 0
+
+void f(int y) {
+ if (y = NO);
+}
+
int
// CHECK: cindex-on-invalid.m:5:8: error: use of undeclared label 'exit'
-// CHECK: cindex-on-invalid.m:13:1: error: expected identifier or '('
+// CHECK: cindex-on-invalid.m:13:9:{13:7-13:13}
+// CHECK: cindex-on-invalid.m:21:1: error: expected identifier or '('