diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-18 15:23:44 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-18 15:23:44 +0000 |
commit | 4807231938d8aff28de09f78f301f9ba5845e5e4 (patch) | |
tree | 6d93685e685370be3a6b5d86085f6118d1e4a71b /test/Index/annotate-tokens-pp.c | |
parent | a49f1afdfa19630c4a76caa4e6ad548ee8f79fd1 (diff) |
More token-annotation experimentation, preprocessing the annotated
token sequence to detect macro instantiations (that produce at least
token). WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/annotate-tokens-pp.c')
-rw-r--r-- | test/Index/annotate-tokens-pp.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/test/Index/annotate-tokens-pp.c b/test/Index/annotate-tokens-pp.c index 32481fe0f0..e646948c89 100644 --- a/test/Index/annotate-tokens-pp.c +++ b/test/Index/annotate-tokens-pp.c @@ -1,6 +1,6 @@ #define BAR baz -#define WIBBLE(X, Y) -WIBBLE(int, float) +#define WIBBLE(X, Y) X##Y +float WIBBLE(int, float); int BAR; #include "foo.h" @@ -17,14 +17,15 @@ int BAR; // CHECK: Punctuation: "," [2:17 - 2:18] preprocessing directive= // CHECK: Identifier: "Y" [2:19 - 2:20] preprocessing directive= // CHECK: Punctuation: ")" [2:20 - 2:21] preprocessing directive= -// CHECK: Identifier: "WIBBLE" [3:1 - 3:7] -// CHECK: Punctuation: "(" [3:7 - 3:8] -// CHECK: Keyword: "int" [3:8 - 3:11] -// CHECK: Punctuation: "," [3:11 - 3:12] -// CHECK: Keyword: "float" [3:13 - 3:18] -// CHECK: Punctuation: ")" [3:18 - 3:19] +// CHECK: Identifier: "WIBBLE" [3:7 - 3:13] macro instantiation= +// CHECK: Punctuation: "(" [3:13 - 3:14] +// CHECK: Keyword: "int" [3:14 - 3:17] +// CHECK: Punctuation: "," [3:17 - 3:18] +// CHECK: Keyword: "float" [3:19 - 3:24] +// CHECK: Punctuation: ")" [3:24 - 3:25] +// CHECK: Punctuation: ";" [3:25 - 3:26] // CHECK: Keyword: "int" [4:1 - 4:4] -// CHECK: Identifier: "BAR" [4:5 - 4:8] +// CHECK: Identifier: "BAR" [4:5 - 4:8] macro instantiation= // CHECK: Punctuation: ";" [4:8 - 4:9] // CHECK: Punctuation: "#" [5:1 - 5:2] preprocessing directive= // CHECK: Identifier: "include" [5:2 - 5:9] preprocessing directive= |