diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-03-09 13:06:04 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-03-09 13:06:04 +0000 |
| commit | 490075a7ddf14c89327a7576fb09d53ddd8c36ff (patch) | |
| tree | e6efd7a5666373df9130fab34b1736dfe0f8f944 /clang | |
| parent | bbf5c262ab6b4530baa91a7876e49b96dd482ccf (diff) | |
| download | bcm5719-llvm-490075a7ddf14c89327a7576fb09d53ddd8c36ff.tar.gz bcm5719-llvm-490075a7ddf14c89327a7576fb09d53ddd8c36ff.zip | |
Add an Objective-C test for token annotation
llvm-svn: 98056
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/test/Index/annotate-tokens.m | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/Index/annotate-tokens.m b/clang/test/Index/annotate-tokens.m new file mode 100644 index 00000000000..c42e6a51844 --- /dev/null +++ b/clang/test/Index/annotate-tokens.m @@ -0,0 +1,22 @@ +@interface Foo +- (int)compare:(Foo*)other; +@end + +// RUN: c-index-test -test-annotate-tokens=%s:1:1:3:5 %s | FileCheck %s +// CHECK: Punctuation: "@" [1:1 - 1:2] +// CHECK: Identifier: "interface" [1:2 - 1:11] +// CHECK: Identifier: "Foo" [1:12 - 1:15] ObjCInterfaceDecl=Foo:1:12 +// CHECK: Punctuation: "-" [2:1 - 2:2] ObjCInstanceMethodDecl=compare::2:1 +// CHECK: Punctuation: "(" [2:3 - 2:4] +// CHECK: Keyword: "int" [2:4 - 2:7] +// CHECK: Punctuation: ")" [2:7 - 2:8] +// CHECK: Identifier: "compare" [2:8 - 2:15] +// CHECK: Punctuation: ":" [2:15 - 2:16] +// CHECK: Punctuation: "(" [2:16 - 2:17] +// CHECK: Identifier: "Foo" [2:17 - 2:20] ObjCClassRef=Foo:1:12 +// CHECK: Punctuation: "*" [2:20 - 2:21] +// CHECK: Punctuation: ")" [2:21 - 2:22] +// CHECK: Identifier: "other" [2:22 - 2:27] ParmDecl=other:2:22 (Definition) +// CHECK: Punctuation: ";" [2:27 - 2:28] +// CHECK: Punctuation: "@" [3:1 - 3:2] +// CHECK: Identifier: "end" [3:2 - 3:5] |

