diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-21 10:50:08 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-21 10:50:08 +0000 |
commit | c0c7bca4e5b8d12699dc93a0da49e9e4bb79671b (patch) | |
tree | 508d4388db78f87d35bf26a0400b4b03bc4c1f13 /test/Index/c-index-getCursor-test.m | |
parent | 4a37f65f1c1373c9956d118a012943de2f61edb0 (diff) | |
download | src-test2-c0c7bca4e5b8d12699dc93a0da49e9e4bb79671b.tar.gz src-test2-c0c7bca4e5b8d12699dc93a0da49e9e4bb79671b.zip |
Notes
Diffstat (limited to 'test/Index/c-index-getCursor-test.m')
-rw-r--r-- | test/Index/c-index-getCursor-test.m | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/Index/c-index-getCursor-test.m b/test/Index/c-index-getCursor-test.m index 8341b80a673f..3cf1b6dcfa0d 100644 --- a/test/Index/c-index-getCursor-test.m +++ b/test/Index/c-index-getCursor-test.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -o %t.ast +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -emit-pch -x objective-c %s -detailed-preprocessing-record -o %t.ast // RUN: c-index-test -test-file-scan %t.ast %s | FileCheck %s @interface Foo { @@ -52,6 +52,13 @@ int main (int argc, const char * argv[]) { main(someEnum, (const char **)bee); } +#define CONCAT(X, Y) X##Y + +void f() { + int CONCAT(my,_var); +} +#undef CONCAT + // CHECK: [1:1 - 3:1] Invalid Cursor => NoDeclFound // CHECK: [3:1 - 7:1] ObjCInterfaceDecl=Foo:3:12 // CHECK: [7:1 - 7:7] ObjCInstanceMethodDecl=foo:7:1 @@ -155,3 +162,7 @@ int main (int argc, const char * argv[]) { // CHECK: [52:33 - 52:36] DeclRefExpr=bee:45:8 // CHECK: [52:36 - 52:37] CallExpr=main:44:5 // CHECK: [52:37 - 53:2] UnexposedStmt= +// CHECK: [55:9 - 55:26] macro definition=CONCAT +// CHECK: [57:6 - 57:10] FunctionDecl=f:57:6 (Definition) +// CHECK: [58:4 - 58:8] VarDecl=my_var:58:8 (Definition) +// CHECK: [58:8 - 58:14] macro instantiation=CONCAT:55:9 |