aboutsummaryrefslogtreecommitdiff
path: root/test/Index
diff options
context:
space:
mode:
Diffstat (limited to 'test/Index')
-rw-r--r--test/Index/TestClassDecl.m2
-rw-r--r--test/Index/TestClassForwardDecl.m2
-rw-r--r--test/Index/c-index-api-fn-scan.m2
-rw-r--r--test/Index/c-index-api-loadTU-test.m2
-rw-r--r--test/Index/c-index-getCursor-test.m2
-rw-r--r--test/Index/c-index-pch.c4
-rw-r--r--test/Index/cindex-from-source.m2
-rw-r--r--test/Index/code-completion.cpp28
-rw-r--r--test/Index/comments.c2
-rw-r--r--test/Index/complete-member-access.m8
-rw-r--r--test/Index/complete-objc-message.m56
-rw-r--r--test/Index/complete-properties.m26
-rw-r--r--test/Index/complete-property-getset.m24
-rw-r--r--test/Index/cxx-operator-overload.cpp2
-rw-r--r--test/Index/find-decls.c4
-rw-r--r--test/Index/find-defs.c4
-rw-r--r--test/Index/find-refs.c4
-rw-r--r--test/Index/multiple-redecls.c2
-rw-r--r--test/Index/objc-decls.m4
-rw-r--r--test/Index/objc-message.m4
-rw-r--r--test/Index/recover-bad-code-rdar_7487294.c14
-rw-r--r--test/Index/remap-complete.c2
-rw-r--r--test/Index/resolve-loc.c2
23 files changed, 114 insertions, 88 deletions
diff --git a/test/Index/TestClassDecl.m b/test/Index/TestClassDecl.m
index 12ae4f451620..5cccf9264c7f 100644
--- a/test/Index/TestClassDecl.m
+++ b/test/Index/TestClassDecl.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 -o %t.ast
// RUN: c-index-test -test-file-scan %t.ast %s | FileCheck -check-prefix=scan %s
// RUN: c-index-test -test-load-tu %t.ast local | FileCheck -check-prefix=load %s
diff --git a/test/Index/TestClassForwardDecl.m b/test/Index/TestClassForwardDecl.m
index db9a1eb5c7af..e795972a7d13 100644
--- a/test/Index/TestClassForwardDecl.m
+++ b/test/Index/TestClassForwardDecl.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 -o %t.ast
// RUN: c-index-test -test-file-scan %t.ast %s | FileCheck -check-prefix=scan %s
// RUN: c-index-test -test-load-tu %t.ast local | FileCheck -check-prefix=load %s
diff --git a/test/Index/c-index-api-fn-scan.m b/test/Index/c-index-api-fn-scan.m
index 0350d87b39e4..8cbc036a5ca2 100644
--- a/test/Index/c-index-api-fn-scan.m
+++ b/test/Index/c-index-api-fn-scan.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 -o %t.ast
// RUN: c-index-test -test-load-tu %t.ast scan-function | FileCheck %s
diff --git a/test/Index/c-index-api-loadTU-test.m b/test/Index/c-index-api-loadTU-test.m
index 446f588c4f9d..6ee50aef1e04 100644
--- a/test/Index/c-index-api-loadTU-test.m
+++ b/test/Index/c-index-api-loadTU-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 -o %t.ast
// RUN: c-index-test -test-load-tu %t.ast all | FileCheck %s
diff --git a/test/Index/c-index-getCursor-test.m b/test/Index/c-index-getCursor-test.m
index d6081bc9de8c..23ae21887830 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 -o %t.ast
// RUN: c-index-test -test-file-scan %t.ast %s | FileCheck %s
@interface Foo
{
diff --git a/test/Index/c-index-pch.c b/test/Index/c-index-pch.c
index 1ce108525186..2037fc58802c 100644
--- a/test/Index/c-index-pch.c
+++ b/test/Index/c-index-pch.c
@@ -1,5 +1,5 @@
-// RUN: clang-cc -emit-pch -x c -o %t.pch %S/Inputs/c-index-pch.h
-// RUN: clang-cc -include-pch %t.pch -x c -emit-pch -o %t.ast %s
+// RUN: %clang_cc1 -emit-pch -x c -o %t.pch %S/Inputs/c-index-pch.h
+// RUN: %clang_cc1 -include-pch %t.pch -x c -emit-pch -o %t.ast %s
// RUN: c-index-test -test-load-tu %t.ast all | FileCheck -check-prefix=ALL %s
// RUN: c-index-test -test-load-tu %t.ast local | FileCheck -check-prefix=LOCAL %s
// ALL: FunctionDecl=foo
diff --git a/test/Index/cindex-from-source.m b/test/Index/cindex-from-source.m
index 8d6a1de4bbdc..e775bb71e11e 100644
--- a/test/Index/cindex-from-source.m
+++ b/test/Index/cindex-from-source.m
@@ -1,5 +1,5 @@
// RUN: echo 'typedef int t0;' > %t.pfx.h
-// RUN: clang -x objective-c-header %t.pfx.h -o %t.pfx.h.gch
+// RUN: %clang -x objective-c-header %t.pfx.h -o %t.pfx.h.gch
// RUN: c-index-test -test-load-source local %s -include %t.pfx.h > %t
// RUN: FileCheck %s < %t
// CHECK: cindex-from-source.m:{{.*}}:{{.*}}: StructDecl=s0:{{.*}}:{{.*}} [Context=cindex-from-source.m]
diff --git a/test/Index/code-completion.cpp b/test/Index/code-completion.cpp
index c286c82d0480..55d068a16694 100644
--- a/test/Index/code-completion.cpp
+++ b/test/Index/code-completion.cpp
@@ -33,20 +33,22 @@ void test_overloaded() {
overloaded(Z(), 0);
}
-// CHECK-MEMBER: FieldDecl:{TypedText member}
-// CHECK-MEMBER: FunctionDecl:{Informative Y::}{TypedText memfunc}{LeftParen (}{Optional {Placeholder int i}}{RightParen )}
-// CHECK-MEMBER: EnumConstantDecl:{Informative E::}{TypedText Val1}
-// CHECK-MEMBER: FunctionDecl:{Informative X::}{TypedText ~X}{LeftParen (}{RightParen )}
-// CHECK-MEMBER: FunctionDecl:{TypedText operator int}{LeftParen (}{RightParen )}
-// CHECK-MEMBER: FunctionDecl:{TypedText operator=}{LeftParen (}{Placeholder struct Z const &}{RightParen )}
-// CHECK-MEMBER: FieldDecl:{Text X::}{TypedText member}
-// CHECK-MEMBER: FieldDecl:{Text Y::}{TypedText member}
-// CHECK-MEMBER: FunctionDecl:{Text X::}{TypedText operator=}{LeftParen (}{Placeholder struct X const &}{RightParen )}
-// CHECK-MEMBER: FunctionDecl:{Text Y::}{TypedText operator=}{LeftParen (}{Placeholder struct Y const &}{RightParen )}
+// CHECK-MEMBER: FieldDecl:{ResultType double}{TypedText member}
+// CHECK-MEMBER: FunctionDecl:{ResultType void}{Informative Y::}{TypedText memfunc}{LeftParen (}{Optional {Placeholder int i}}{RightParen )}
+// CHECK-MEMBER: EnumConstantDecl:{ResultType enum X::E}{Informative E::}{TypedText Val1}
+// CHECK-MEMBER: FunctionDecl:{ResultType void}{Informative X::}{TypedText ~X}{LeftParen (}{RightParen )}
+// CHECK-MEMBER: FunctionDecl:{ResultType void}{Informative Y::}{TypedText ~Y}{LeftParen (}{RightParen )}
+// CHECK-MEMBER: FunctionDecl:{ResultType void}{TypedText ~Z}{LeftParen (}{RightParen )}
+// CHECK-MEMBER: FunctionDecl:{ResultType int}{TypedText operator int}{LeftParen (}{RightParen )}{Informative const}
+// CHECK-MEMBER: FunctionDecl:{ResultType struct Z &}{TypedText operator=}{LeftParen (}{Placeholder struct Z const &}{RightParen )}
+// CHECK-MEMBER: FieldDecl:{ResultType int}{Text X::}{TypedText member}
+// CHECK-MEMBER: FieldDecl:{ResultType float}{Text Y::}{TypedText member}
+// CHECK-MEMBER: FunctionDecl:{ResultType struct X &}{Text X::}{TypedText operator=}{LeftParen (}{Placeholder struct X const &}{RightParen )}
+// CHECK-MEMBER: FunctionDecl:{ResultType struct Y &}{Text Y::}{TypedText operator=}{LeftParen (}{Placeholder struct Y const &}{RightParen )}
// CHECK-MEMBER: StructDecl:{TypedText X}{Text ::}
// CHECK-MEMBER: StructDecl:{TypedText Y}{Text ::}
// CHECK-MEMBER: StructDecl:{TypedText Z}{Text ::}
-// CHECK-OVERLOAD: NotImplemented:{Text overloaded}{LeftParen (}{Text struct Z z}{Comma , }{CurrentParameter int second}{RightParen )}
-// CHECK-OVERLOAD: NotImplemented:{Text overloaded}{LeftParen (}{Text int i}{Comma , }{CurrentParameter long second}{RightParen )}
-// CHECK-OVERLOAD: NotImplemented:{Text overloaded}{LeftParen (}{Text float f}{Comma , }{CurrentParameter int second}{RightParen )}
+// CHECK-OVERLOAD: NotImplemented:{ResultType int &}{Text overloaded}{LeftParen (}{Text struct Z z}{Comma , }{CurrentParameter int second}{RightParen )}
+// CHECK-OVERLOAD: NotImplemented:{ResultType float &}{Text overloaded}{LeftParen (}{Text int i}{Comma , }{CurrentParameter long second}{RightParen )}
+// CHECK-OVERLOAD: NotImplemented:{ResultType double &}{Text overloaded}{LeftParen (}{Text float f}{Comma , }{CurrentParameter int second}{RightParen )}
diff --git a/test/Index/comments.c b/test/Index/comments.c
index 83bdbf6eed7d..034317779c6e 100644
--- a/test/Index/comments.c
+++ b/test/Index/comments.c
@@ -19,7 +19,7 @@ void g(int);
void h(int); ///< This is a member comment.
-// RUN: clang-cc -emit-pch -o %t.ast %s
+// RUN: %clang_cc1 -emit-pch -o %t.ast %s
// RUN: index-test %t.ast -point-at %s:11:6 > %t
// RUN: grep "starts here" %t
diff --git a/test/Index/complete-member-access.m b/test/Index/complete-member-access.m
index 9202d0522f4b..2502d7705b9c 100644
--- a/test/Index/complete-member-access.m
+++ b/test/Index/complete-member-access.m
@@ -23,8 +23,8 @@ void test_props(Int* ptr) {
}
// RUN: c-index-test -code-completion-at=%s:21:7 %s | FileCheck -check-prefix=CHECK-CC1 %s
-// CHECK-CC1: ObjCPropertyDecl:{TypedText prop1}
-// CHECK-CC1: ObjCPropertyDecl:{TypedText ProtoProp}
+// CHECK-CC1: ObjCPropertyDecl:{ResultType int}{TypedText prop1}
+// CHECK-CC1: ObjCPropertyDecl:{ResultType float}{TypedText ProtoProp}
// RUN: c-index-test -code-completion-at=%s:22:8 %s | FileCheck -check-prefix=CHECK-CC2 %s
-// CHECK-CC2: ObjCIvarDecl:{TypedText IVar}
-// CHECK-CC2: ObjCIvarDecl:{TypedText SuperIVar}
+// CHECK-CC2: ObjCIvarDecl:{ResultType int}{TypedText IVar}
+// CHECK-CC2: ObjCIvarDecl:{ResultType int}{TypedText SuperIVar}
diff --git a/test/Index/complete-objc-message.m b/test/Index/complete-objc-message.m
index 1c03095e2a01..a7b37fd2442c 100644
--- a/test/Index/complete-objc-message.m
+++ b/test/Index/complete-objc-message.m
@@ -95,6 +95,14 @@ void test_overload(Overload *ovl) {
[ovl Method:1 Arg1:1 OtherArg:ovl];
}
+@interface Ellipsis
+- (int)Method:(int)i, ...;
+@end
+
+void f(Ellipsis *e) {
+ [e Method:1, 2, 3];
+}
+
// RUN: c-index-test -code-completion-at=%s:23:19 %s | FileCheck -check-prefix=CHECK-CC1 %s
// CHECK-CC1: {TypedText categoryClassMethod}
// CHECK-CC1: {TypedText classMethod1:}{Placeholder (id)a}{Text withKeyword:}{Placeholder (int)b}
@@ -106,40 +114,42 @@ void test_overload(Overload *ovl) {
// CHECK-CC2: {TypedText instanceMethod1}
// CHECK-CC2: {TypedText protocolInstanceMethod:}{Placeholder (int)value}
// RUN: c-index-test -code-completion-at=%s:61:16 %s | FileCheck -check-prefix=CHECK-CC3 %s
-// CHECK-CC3: ObjCClassMethodDecl:{TypedText MyClassMethod:}{Placeholder (id)obj}
-// CHECK-CC3: ObjCClassMethodDecl:{TypedText MyPrivateMethod}
+// CHECK-CC3: ObjCClassMethodDecl:{ResultType int}{TypedText MyClassMethod:}{Placeholder (id)obj}
+// CHECK-CC3: ObjCClassMethodDecl:{ResultType int}{TypedText MyPrivateMethod}
// RUN: c-index-test -code-completion-at=%s:65:16 %s | FileCheck -check-prefix=CHECK-CC4 %s
-// CHECK-CC4: ObjCInstanceMethodDecl:{TypedText MyInstMethod:}{Placeholder (id)x}{Text second:}{Placeholder (id)y}
-// CHECK-CC4: ObjCInstanceMethodDecl:{TypedText MyPrivateInstMethod}
+// CHECK-CC4: ObjCInstanceMethodDecl:{ResultType int}{TypedText MyInstMethod:}{Placeholder (id)x}{Text second:}{Placeholder (id)y}
+// CHECK-CC4: ObjCInstanceMethodDecl:{ResultType int}{TypedText MyPrivateInstMethod}
// RUN: c-index-test -code-completion-at=%s:74:9 %s | FileCheck -check-prefix=CHECK-CC5 %s
-// CHECK-CC5: ObjCInstanceMethodDecl:{TypedText MyInstMethod:}{Placeholder (id)x}{Text second:}{Placeholder (id)y}
-// CHECK-CC5: ObjCInstanceMethodDecl:{TypedText MySubInstMethod}
+// CHECK-CC5: ObjCInstanceMethodDecl:{ResultType int}{TypedText MyInstMethod:}{Placeholder (id)x}{Text second:}{Placeholder (id)y}
+// CHECK-CC5: ObjCInstanceMethodDecl:{ResultType int}{TypedText MySubInstMethod}
// RUN: c-index-test -code-completion-at=%s:82:8 %s | FileCheck -check-prefix=CHECK-CC6 %s
-// CHECK-CC6: ObjCInstanceMethodDecl:{TypedText protocolInstanceMethod:}{Placeholder (int)value}
-// CHECK-CC6: ObjCInstanceMethodDecl:{TypedText secondProtocolInstanceMethod}
+// CHECK-CC6: ObjCInstanceMethodDecl:{ResultType id}{TypedText protocolInstanceMethod:}{Placeholder (int)value}
+// CHECK-CC6: ObjCInstanceMethodDecl:{ResultType int}{TypedText secondProtocolInstanceMethod}
// RUN: c-index-test -code-completion-at=%s:95:8 %s | FileCheck -check-prefix=CHECK-CC7 %s
-// CHECK-CC7: ObjCInstanceMethodDecl:{TypedText Method}
-// CHECK-CC7: ObjCInstanceMethodDecl:{TypedText Method:}{Placeholder (int)i}
-// CHECK-CC7: ObjCInstanceMethodDecl:{TypedText Method:}{Placeholder (float)f}{Text Arg1:}{Placeholder (int)i1}{Text Arg2:}{Placeholder (int)i2}
-// CHECK-CC7: ObjCInstanceMethodDecl:{TypedText Method:}{Placeholder (float)f}{Text Arg1:}{Placeholder (int)i1}{Text OtherArg:}{Placeholder (id)obj}
-// CHECK-CC7: ObjCInstanceMethodDecl:{TypedText Method:}{Placeholder (float)f}{Text SomeArg:}{Placeholder (int)i1}{Text OtherArg:}{Placeholder (id)obj}
-// CHECK-CC7: ObjCInstanceMethodDecl:{TypedText OtherMethod:}{Placeholder (float)f}{Text Arg1:}{Placeholder (int)i1}{Text Arg2:}{Placeholder (int)i2}
+// CHECK-CC7: ObjCInstanceMethodDecl:{ResultType int}{TypedText Method}
+// CHECK-CC7: ObjCInstanceMethodDecl:{ResultType int}{TypedText Method:}{Placeholder (int)i}
+// CHECK-CC7: ObjCInstanceMethodDecl:{ResultType int}{TypedText Method:}{Placeholder (float)f}{Text Arg1:}{Placeholder (int)i1}{Text Arg2:}{Placeholder (int)i2}
+// CHECK-CC7: ObjCInstanceMethodDecl:{ResultType int}{TypedText Method:}{Placeholder (float)f}{Text Arg1:}{Placeholder (int)i1}{Text OtherArg:}{Placeholder (id)obj}
+// CHECK-CC7: ObjCInstanceMethodDecl:{ResultType int}{TypedText Method:}{Placeholder (float)f}{Text SomeArg:}{Placeholder (int)i1}{Text OtherArg:}{Placeholder (id)obj}
+// CHECK-CC7: ObjCInstanceMethodDecl:{ResultType int}{TypedText OtherMethod:}{Placeholder (float)f}{Text Arg1:}{Placeholder (int)i1}{Text Arg2:}{Placeholder (int)i2}
// RUN: c-index-test -code-completion-at=%s:95:17 %s | FileCheck -check-prefix=CHECK-CC8 %s
-// CHECK-CC8: ObjCInstanceMethodDecl:{Informative Method:}{TypedText }
-// CHECK-CC8: ObjCInstanceMethodDecl:{Informative Method:}{TypedText Arg1:}{Placeholder (int)i1}{Text Arg2:}{Placeholder (int)i2}
-// CHECK-CC8: ObjCInstanceMethodDecl:{Informative Method:}{TypedText Arg1:}{Placeholder (int)i1}{Text OtherArg:}{Placeholder (id)obj}
-// CHECK-CC8: ObjCInstanceMethodDecl:{Informative Method:}{TypedText SomeArg:}{Placeholder (int)i1}{Text OtherArg:}{Placeholder (id)obj}
+// CHECK-CC8: ObjCInstanceMethodDecl:{ResultType int}{Informative Method:}{TypedText }
+// CHECK-CC8: ObjCInstanceMethodDecl:{ResultType int}{Informative Method:}{TypedText Arg1:}{Placeholder (int)i1}{Text Arg2:}{Placeholder (int)i2}
+// CHECK-CC8: ObjCInstanceMethodDecl:{ResultType int}{Informative Method:}{TypedText Arg1:}{Placeholder (int)i1}{Text OtherArg:}{Placeholder (id)obj}
+// CHECK-CC8: ObjCInstanceMethodDecl:{ResultType int}{Informative Method:}{TypedText SomeArg:}{Placeholder (int)i1}{Text OtherArg:}{Placeholder (id)obj}
// RUN: c-index-test -code-completion-at=%s:95:24 %s | FileCheck -check-prefix=CHECK-CC9 %s
-// CHECK-CC9: ObjCInstanceMethodDecl:{Informative Method:}{Informative Arg1:}{TypedText Arg2:}{Placeholder (int)i2}
-// CHECK-CC9: ObjCInstanceMethodDecl:{Informative Method:}{Informative Arg1:}{TypedText OtherArg:}{Placeholder (id)obj}
+// CHECK-CC9: ObjCInstanceMethodDecl:{ResultType int}{Informative Method:}{Informative Arg1:}{TypedText Arg2:}{Placeholder (int)i2}
+// CHECK-CC9: ObjCInstanceMethodDecl:{ResultType int}{Informative Method:}{Informative Arg1:}{TypedText OtherArg:}{Placeholder (id)obj}
// RUN: c-index-test -code-completion-at=%s:61:11 %s | FileCheck -check-prefix=CHECK-CCA %s
-// CHECK-CCA: {TypedText _cmd}
-// CHECK-CCA: {TypedText self}
+// CHECK-CCA: {ResultType SEL}{TypedText _cmd}
+// CHECK-CCA: {ResultType Class}{TypedText self}
// CHECK-CCA: TypedefDecl:{TypedText Class}
// CHECK-CCA: ObjCInterfaceDecl:{TypedText Foo}
-// CHECK-CCA: FunctionDecl:{TypedText func}{LeftParen (}{RightParen )}
+// CHECK-CCA: FunctionDecl:{ResultType void}{TypedText func}{LeftParen (}{RightParen )}
// CHECK-CCA: TypedefDecl:{TypedText id}
// CHECK-CCA: ObjCInterfaceDecl:{TypedText MyClass}
// CHECK-CCA: ObjCInterfaceDecl:{TypedText MySubClass}
// CHECK-CCA: TypedefDecl:{TypedText SEL}
// CHECK-CCA: {TypedText super}
+// RUN: c-index-test -code-completion-at=%s:103:6 %s | FileCheck -check-prefix=CHECK-CCB %s
+// CHECK-CCB: ObjCInstanceMethodDecl:{ResultType int}{TypedText Method:}{Placeholder (int)i}{Placeholder , ...}
diff --git a/test/Index/complete-properties.m b/test/Index/complete-properties.m
index a99b1d1413d9..80e10e7822c7 100644
--- a/test/Index/complete-properties.m
+++ b/test/Index/complete-properties.m
@@ -22,19 +22,19 @@
@end
// RUN: c-index-test -code-completion-at=%s:20:13 %s | FileCheck -check-prefix=CHECK-CC1 %s
-// CHECK-CC1: ObjCPropertyDecl:{TypedText Prop0}
-// CHECK-CC1: ObjCPropertyDecl:{TypedText Prop1}
-// CHECK-CC1: ObjCPropertyDecl:{TypedText Prop2}
-// CHECK-CC1: ObjCPropertyDecl:{TypedText Prop3}
-// CHECK-CC1: ObjCPropertyDecl:{TypedText Prop4}
+// CHECK-CC1: ObjCPropertyDecl:{ResultType int}{TypedText Prop0}
+// CHECK-CC1: ObjCPropertyDecl:{ResultType int}{TypedText Prop1}
+// CHECK-CC1: ObjCPropertyDecl:{ResultType float}{TypedText Prop2}
+// CHECK-CC1: ObjCPropertyDecl:{ResultType id}{TypedText Prop3}
+// CHECK-CC1: ObjCPropertyDecl:{ResultType id}{TypedText Prop4}
// RUN: c-index-test -code-completion-at=%s:20:20 %s | FileCheck -check-prefix=CHECK-CC2 %s
-// CHECK-CC2: ObjCPropertyDecl:{TypedText Prop0}
-// CHECK-CC2: ObjCPropertyDecl:{TypedText Prop1}
-// CHECK-CC2-NEXT: ObjCPropertyDecl:{TypedText Prop3}
-// CHECK-CC2: ObjCPropertyDecl:{TypedText Prop4}
+// CHECK-CC2: ObjCPropertyDecl:{ResultType int}{TypedText Prop0}
+// CHECK-CC2: ObjCPropertyDecl:{ResultType int}{TypedText Prop1}
+// CHECK-CC2-NEXT: ObjCPropertyDecl:{ResultType id}{TypedText Prop3}
+// CHECK-CC2: ObjCPropertyDecl:{ResultType id}{TypedText Prop4}
// RUN: c-index-test -code-completion-at=%s:20:35 %s | FileCheck -check-prefix=CHECK-CC3 %s
-// CHECK-CC3: ObjCIvarDecl:{TypedText RandomIVar}
-// CHECK-CC3: ObjCIvarDecl:{TypedText StoredProp3}
+// CHECK-CC3: ObjCIvarDecl:{ResultType int}{TypedText RandomIVar}
+// CHECK-CC3: ObjCIvarDecl:{ResultType id}{TypedText StoredProp3}
// RUN: c-index-test -code-completion-at=%s:21:10 %s | FileCheck -check-prefix=CHECK-CC4 %s
-// CHECK-CC4: ObjCPropertyDecl:{TypedText Prop0}
-// CHECK-CC4-NEXT: ObjCPropertyDecl:{TypedText Prop4}
+// CHECK-CC4: ObjCPropertyDecl:{ResultType int}{TypedText Prop0}
+// CHECK-CC4-NEXT: ObjCPropertyDecl:{ResultType id}{TypedText Prop4}
diff --git a/test/Index/complete-property-getset.m b/test/Index/complete-property-getset.m
index a2a80533a32b..f4424ced0812 100644
--- a/test/Index/complete-property-getset.m
+++ b/test/Index/complete-property-getset.m
@@ -20,22 +20,22 @@
@end
// RUN: c-index-test -code-completion-at=%s:13:21 %s | FileCheck -check-prefix=CHECK-CC1 %s
-// CHECK-CC1: ObjCInstanceMethodDecl:{TypedText getter1}
+// CHECK-CC1: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter1}
// CHECK-CC1-NOT: getter2
-// CHECK-CC1: ObjCInstanceMethodDecl:{TypedText getter3}
+// CHECK-CC1: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter3}
// RUN: c-index-test -code-completion-at=%s:13:39 %s | FileCheck -check-prefix=CHECK-CC2 %s
-// CHECK-CC2: ObjCInstanceMethodDecl:{TypedText getter2_not:}
-// CHECK-CC2: ObjCInstanceMethodDecl:{TypedText setter1:}
+// CHECK-CC2: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter2_not:}
+// CHECK-CC2: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter1:}
// CHECK-CC2-NOT: setter2
-// CHECK-CC2: ObjCInstanceMethodDecl:{TypedText setter3:}
+// CHECK-CC2: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter3:}
// RUN: c-index-test -code-completion-at=%s:19:21 %s | FileCheck -check-prefix=CHECK-CC3 %s
-// CHECK-CC3: ObjCInstanceMethodDecl:{TypedText getter1}
+// CHECK-CC3: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter1}
// CHECK-CC3-NOT: getter2
-// CHECK-CC3: ObjCInstanceMethodDecl:{TypedText getter3}
-// CHECK-CC3: ObjCInstanceMethodDecl:{TypedText getter4}
+// CHECK-CC3: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter3}
+// CHECK-CC3: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter4}
// RUN: c-index-test -code-completion-at=%s:19:39 %s | FileCheck -check-prefix=CHECK-CC4 %s
-// CHECK-CC4: ObjCInstanceMethodDecl:{TypedText getter2_not:}{Informative (int)x}
-// CHECK-CC4: ObjCInstanceMethodDecl:{TypedText setter1:}{Informative (int)x}
+// CHECK-CC4: ObjCInstanceMethodDecl:{ResultType int}{TypedText getter2_not:}{Informative (int)x}
+// CHECK-CC4: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter1:}{Informative (int)x}
// CHECK-CC4-NOT: setter2
-// CHECK-CC4: ObjCInstanceMethodDecl:{TypedText setter3:}{Informative (int)y}
-// CHECK-CC4: ObjCInstanceMethodDecl:{TypedText setter4:}{Informative (int)x}
+// CHECK-CC4: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter3:}{Informative (int)y}
+// CHECK-CC4: ObjCInstanceMethodDecl:{ResultType void}{TypedText setter4:}{Informative (int)x}
diff --git a/test/Index/cxx-operator-overload.cpp b/test/Index/cxx-operator-overload.cpp
index 9bda03ef8dc4..864744859332 100644
--- a/test/Index/cxx-operator-overload.cpp
+++ b/test/Index/cxx-operator-overload.cpp
@@ -12,7 +12,7 @@ static void bar() {
Cls Cls::operator +(const Cls &RHS) { while (1) {} }
-// RUN: clang-cc -emit-pch %s -o %t.ast
+// RUN: %clang_cc1 -emit-pch %s -o %t.ast
// RUNx: index-test %t.ast -point-at %s:10:17 -print-decls > %t &&
// RUNx: cat %t | count 2 &&
diff --git a/test/Index/find-decls.c b/test/Index/find-decls.c
index 99a32428005b..f1999b2151b4 100644
--- a/test/Index/find-decls.c
+++ b/test/Index/find-decls.c
@@ -1,5 +1,5 @@
-// RUN: clang-cc -fblocks -emit-pch %S/Inputs/t1.c -o %t1.ast
-// RUN: clang-cc -fblocks -emit-pch %S/Inputs/t2.c -o %t2.ast
+// RUN: %clang_cc1 -fblocks -emit-pch %S/Inputs/t1.c -o %t1.ast
+// RUN: %clang_cc1 -fblocks -emit-pch %S/Inputs/t2.c -o %t2.ast
// RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/t1.c:8:7 -print-decls > %t
// RUN: cat %t | count 3
diff --git a/test/Index/find-defs.c b/test/Index/find-defs.c
index fb540727341a..51292704a1b6 100644
--- a/test/Index/find-defs.c
+++ b/test/Index/find-defs.c
@@ -1,5 +1,5 @@
-// RUN: clang-cc -fblocks -emit-pch %S/Inputs/t1.c -o %t1.ast
-// RUN: clang-cc -fblocks -emit-pch %S/Inputs/t2.c -o %t2.ast
+// RUN: %clang_cc1 -fblocks -emit-pch %S/Inputs/t1.c -o %t1.ast
+// RUN: %clang_cc1 -fblocks -emit-pch %S/Inputs/t2.c -o %t2.ast
// RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/foo.h:1:14 -print-defs > %t
// RUN: cat %t | count 1
diff --git a/test/Index/find-refs.c b/test/Index/find-refs.c
index 5209e141b629..1f29a77017de 100644
--- a/test/Index/find-refs.c
+++ b/test/Index/find-refs.c
@@ -1,5 +1,5 @@
-// RUN: clang-cc -fblocks -emit-pch %S/Inputs/t1.c -o %t1.ast
-// RUN: clang-cc -fblocks -emit-pch %S/Inputs/t2.c -o %t2.ast
+// RUN: %clang_cc1 -fblocks -emit-pch %S/Inputs/t1.c -o %t1.ast
+// RUN: %clang_cc1 -fblocks -emit-pch %S/Inputs/t2.c -o %t2.ast
// RUN: index-test %t1.ast %t2.ast -point-at %S/Inputs/foo.h:1:14 -print-refs > %t
// RUN: cat %t | count 4
diff --git a/test/Index/multiple-redecls.c b/test/Index/multiple-redecls.c
index ea6d00b6a3c4..faea88fc6b77 100644
--- a/test/Index/multiple-redecls.c
+++ b/test/Index/multiple-redecls.c
@@ -1,4 +1,4 @@
-// RUN: clang-cc -emit-pch %s -o %t.ast
+// RUN: %clang_cc1 -emit-pch %s -o %t.ast
// RUN: index-test %t.ast -point-at %s:8:4 -print-decls | count 2
// RUN: index-test %t.ast -point-at %s:8:4 -print-defs | count 1
diff --git a/test/Index/objc-decls.m b/test/Index/objc-decls.m
index 62a43da007b3..4fcd830212bb 100644
--- a/test/Index/objc-decls.m
+++ b/test/Index/objc-decls.m
@@ -1,5 +1,5 @@
-// RUN: clang -cc1 -emit-pch %S/Inputs/t1.m -o %t1.m.ast
-// RUN: clang -cc1 -emit-pch %S/Inputs/t2.m -o %t2.m.ast
+// RUN: %clang_cc1 -emit-pch %S/Inputs/t1.m -o %t1.m.ast
+// RUN: %clang_cc1 -emit-pch %S/Inputs/t2.m -o %t2.m.ast
// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/Inputs/t1.m:12:12 -print-decls > %t
// RUN: cat %t | count 2
diff --git a/test/Index/objc-message.m b/test/Index/objc-message.m
index 568ca9494f55..151565b9bba2 100644
--- a/test/Index/objc-message.m
+++ b/test/Index/objc-message.m
@@ -1,5 +1,5 @@
-// RUN: clang -cc1 -emit-pch %S/Inputs/t1.m -o %t1.m.ast
-// RUN: clang -cc1 -emit-pch %S/Inputs/t2.m -o %t2.m.ast
+// RUN: %clang_cc1 -emit-pch %S/Inputs/t1.m -o %t1.m.ast
+// RUN: %clang_cc1 -emit-pch %S/Inputs/t2.m -o %t2.m.ast
// RUN: index-test %t1.m.ast %t2.m.ast -point-at %S/Inputs/objc.h:5:13 -print-refs > %t
// RUN: cat %t | count 1
diff --git a/test/Index/recover-bad-code-rdar_7487294.c b/test/Index/recover-bad-code-rdar_7487294.c
new file mode 100644
index 000000000000..97bb5158e472
--- /dev/null
+++ b/test/Index/recover-bad-code-rdar_7487294.c
@@ -0,0 +1,14 @@
+// RUN: %clang-cc1 -fsyntax-only %s 2>&1 | FileCheck %s
+
+// IMPORTANT: This test case intentionally DOES NOT use --disable-free. It
+// tests that we are properly reclaiming the ASTs and we do not have a double free.
+// Previously we tried to free the size expression of the VLA twice.
+
+int foo(int x) {
+ int y[x * 3];
+ help
+};
+
+// CHECK: 9:3: error: use of undeclared identifier 'help'
+// CHECK: help
+// CHECK: 14:102: error: expected '}'
diff --git a/test/Index/remap-complete.c b/test/Index/remap-complete.c
index cfafd3051d8f..9b7de0699d45 100644
--- a/test/Index/remap-complete.c
+++ b/test/Index/remap-complete.c
@@ -1,5 +1,5 @@
// RUN: c-index-test -code-completion-at=%s:1:12 -remap-file="%s;%S/Inputs/remap-complete-to.c" %s | FileCheck %s
// XFAIL: win32
-// CHECK: FunctionDecl:{TypedText f0}{LeftParen (}{RightParen )}
+// CHECK: FunctionDecl:{ResultType void}{TypedText f0}{LeftParen (}{RightParen )}
void f() { }
diff --git a/test/Index/resolve-loc.c b/test/Index/resolve-loc.c
index f4697171ee18..68504ee0d2bc 100644
--- a/test/Index/resolve-loc.c
+++ b/test/Index/resolve-loc.c
@@ -16,7 +16,7 @@ struct S {
};
-// RUN: clang-cc -emit-pch %s -o %t.ast
+// RUN: %clang_cc1 -emit-pch %s -o %t.ast
// RUN: index-test %t.ast -point-at %s:3:8 | grep top_var
// RUN: index-test %t.ast -point-at %s:5:15 | grep top_func_decl
// RUN: index-test %t.ast -point-at %s:5:25 | grep param1