summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/c-index-getCursor-pp.c
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-09-11 02:17:21 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-09-11 02:17:21 +0000
commite552941316377be6dacbf8aa21ce2ffb5f1931e0 (patch)
tree25e846566a06de64bbe2c971e0b83398abdc2be3 /clang/test/Index/c-index-getCursor-pp.c
parent8238461211b8df4374d79ab706e18b40c7a756df (diff)
downloadbcm5719-llvm-e552941316377be6dacbf8aa21ce2ffb5f1931e0.tar.gz
bcm5719-llvm-e552941316377be6dacbf8aa21ce2ffb5f1931e0.zip
[libclang] Fix getting a cursor inside an angled #include directive.
Fixed by pointing the end location of the preprocessed entity for the #include at the closing '>', instead of the start of '<'. rdar://11113134 llvm-svn: 163588
Diffstat (limited to 'clang/test/Index/c-index-getCursor-pp.c')
-rw-r--r--clang/test/Index/c-index-getCursor-pp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Index/c-index-getCursor-pp.c b/clang/test/Index/c-index-getCursor-pp.c
index 0a10450af5c..01b0a6972ee 100644
--- a/clang/test/Index/c-index-getCursor-pp.c
+++ b/clang/test/Index/c-index-getCursor-pp.c
@@ -15,6 +15,8 @@ B(int x);
const char *fname = __FILE__;
+#include <a.h>
+
// RUN: c-index-test -cursor-at=%s:1:11 -I%S/Inputs %s | FileCheck -check-prefix=CHECK-1 %s
// CHECK-1: macro definition=OBSCURE
// RUN: c-index-test -cursor-at=%s:2:14 -I%S/Inputs %s | FileCheck -check-prefix=CHECK-2 %s
@@ -31,6 +33,8 @@ const char *fname = __FILE__;
// CHECK-7: macro expansion=B:12:9
// RUN: c-index-test -cursor-at=%s:16:25 -I%S/Inputs %s | FileCheck -check-prefix=CHECK-8 %s
// CHECK-8: macro expansion=__FILE__
+// RUN: c-index-test -cursor-at=%s:18:12 -I%S/Inputs %s | FileCheck -check-prefix=CHECK-9 %s
+// CHECK-9: inclusion directive=a.h
// Same tests, but with "editing" optimizations
// RUN: env CINDEXTEST_EDITING=1 c-index-test -cursor-at=%s:1:11 -I%S/Inputs %s | FileCheck -check-prefix=CHECK-1 %s
OpenPOWER on IntegriCloud