diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-09-26 08:01:41 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-09-26 08:01:41 +0000 |
commit | ee0f84fc84ed7de7975e102668d8e53a778f7a8c (patch) | |
tree | 8b93a515c07f1806207d85a1517c45b4d3aed9cd /test/Index/annotate-tokens-pp.c | |
parent | 7e7b503211f1c0ae1537da4657c9ed34f69b3506 (diff) |
Don't map a file:line:col triplet that is inside the preamble range to
a "loaded" location of the precompiled preamble.
Instead, handle specially locations of preprocessed entities:
-When looking up for preprocessed entities, map main file locations inside the
preamble range to a preamble loaded location.
-When getting the source range of a preprocessing cursor, map preamble loaded
locations back to main file locations.
Fixes rdar://10175093 & http://llvm.org/PR10999
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140519 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/annotate-tokens-pp.c')
-rw-r--r-- | test/Index/annotate-tokens-pp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/Index/annotate-tokens-pp.c b/test/Index/annotate-tokens-pp.c index ecdabb6dbc..a814ac5f45 100644 --- a/test/Index/annotate-tokens-pp.c +++ b/test/Index/annotate-tokens-pp.c @@ -31,6 +31,7 @@ void test() { const char *fname = __FILE__; // RUN: c-index-test -test-annotate-tokens=%s:2:1:32:1 -I%S/Inputs %s | FileCheck %s +// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-annotate-tokens=%s:2:1:32:1 -I%S/Inputs %s | FileCheck %s // CHECK: Punctuation: "#" [2:1 - 2:2] preprocessing directive= // CHECK: Identifier: "define" [2:2 - 2:8] preprocessing directive= // CHECK: Identifier: "STILL_NOTHING" [2:9 - 2:22] macro definition=STILL_NOTHING |