From f88e35ba0b0fc4b0327fe9705e9eee80c8c6ba21 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 30 Nov 2010 06:16:57 +0000 Subject: 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 --- clang/test/Index/c-index-getCursor-pp.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/test/Index/c-index-getCursor-pp.c') 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 -- cgit v1.2.3