summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/c-index-getCursor-pp.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-11-30 06:16:57 +0000
committerDouglas Gregor <dgregor@apple.com>2010-11-30 06:16:57 +0000
commitf88e35ba0b0fc4b0327fe9705e9eee80c8c6ba21 (patch)
tree661c87e22ab5d34cbd3eaa8e706d5a9f1a290083 /clang/test/Index/c-index-getCursor-pp.c
parentb42f34b652700e6d62aeced2513132f0d364c4ef (diff)
downloadbcm5719-llvm-f88e35ba0b0fc4b0327fe9705e9eee80c8c6ba21.tar.gz
bcm5719-llvm-f88e35ba0b0fc4b0327fe9705e9eee80c8c6ba21.zip
When using a precompiled preamble with detailed preprocessing records,
trap the serialized preprocessing records (macro definitions, macro instantiations, macro definitions) from the generation of the precompiled preamble, then replay those when walking the list of preprocessed entities. This eliminates a bug where clang_getCursor() wasn't able to find preprocessed-entity cursors in the preamble. llvm-svn: 120396
Diffstat (limited to 'clang/test/Index/c-index-getCursor-pp.c')
-rw-r--r--clang/test/Index/c-index-getCursor-pp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Index/c-index-getCursor-pp.c b/clang/test/Index/c-index-getCursor-pp.c
index 5f3c1df990b..2393965c283 100644
--- a/clang/test/Index/c-index-getCursor-pp.c
+++ b/clang/test/Index/c-index-getCursor-pp.c
@@ -20,3 +20,9 @@ void OBSCURE(func)(int x) {
// CHECK-5: macro instantiation=DECORATION:2:9
// RUN: c-index-test -cursor-at=%s:9:10 -I%S/Inputs %s | FileCheck -check-prefix=CHECK-6 %s
// CHECK-6: 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
+// RUN: env CINDEXTEST_EDITING=1 c-index-test -cursor-at=%s:2:14 -I%S/Inputs %s | FileCheck -check-prefix=CHECK-2 %s
+// RUN: env CINDEXTEST_EDITING=1 c-index-test -cursor-at=%s:5:7 -I%S/Inputs %s | FileCheck -check-prefix=CHECK-3 %s
+// RUN: env CINDEXTEST_EDITING=1 c-index-test -cursor-at=%s:9:10 -I%S/Inputs %s | FileCheck -check-prefix=CHECK-6 %s
OpenPOWER on IntegriCloud