summaryrefslogtreecommitdiff
path: root/test/PCH
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-12-15 18:49:47 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-12-15 18:49:47 +0000
commit34d02d0b37f16015f317a935c48ce8b7b64ae77b (patch)
tree2fd5819f49caecc5f520219b6b9254fe94ebb138 /test/PCH
parent1569ce68681d909594d64f9b056d71f5dd7563bf (diff)
Notes
Diffstat (limited to 'test/PCH')
-rw-r--r--test/PCH/method_pool.m6
-rw-r--r--test/PCH/objc_exprs.m6
-rw-r--r--test/PCH/objc_import.m6
-rw-r--r--test/PCH/objc_methods.m6
-rw-r--r--test/PCH/objc_property.m6
-rw-r--r--test/PCH/source-manager-stack.c12
6 files changed, 27 insertions, 15 deletions
diff --git a/test/PCH/method_pool.m b/test/PCH/method_pool.m
index 053438828e36c..17e2420081ff1 100644
--- a/test/PCH/method_pool.m
+++ b/test/PCH/method_pool.m
@@ -1,9 +1,9 @@
// Test this without pch.
-// RUN: clang-cc -include %S/method_pool.h -fsyntax-only -verify %s
+// RUN: clang -cc1 -include %S/method_pool.h -fsyntax-only -verify %s
// Test with pch.
-// RUN: clang-cc -x objective-c -emit-pch -o %t %S/method_pool.h
-// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s
+// RUN: clang -cc1 -x objective-c -emit-pch -o %t %S/method_pool.h
+// RUN: clang -cc1 -include-pch %t -fsyntax-only -verify %s
int message_id(id x) {
return [x instMethod:17]; // expected-warning{{multiple methods}}
diff --git a/test/PCH/objc_exprs.m b/test/PCH/objc_exprs.m
index 9eb5a113a2470..0c12b8e177fcc 100644
--- a/test/PCH/objc_exprs.m
+++ b/test/PCH/objc_exprs.m
@@ -1,9 +1,9 @@
// Test this without pch.
-// RUN: clang-cc -fblocks -include %S/objc_exprs.h -fsyntax-only -verify %s
+// RUN: clang -cc1 -fblocks -include %S/objc_exprs.h -fsyntax-only -verify %s
// Test with pch.
-// RUN: clang-cc -x objective-c-header -emit-pch -fblocks -o %t %S/objc_exprs.h
-// RUN: clang-cc -fblocks -include-pch %t -fsyntax-only -verify %s
+// RUN: clang -cc1 -x objective-c-header -emit-pch -fblocks -o %t %S/objc_exprs.h
+// RUN: clang -cc1 -fblocks -include-pch %t -fsyntax-only -verify %s
// Expressions
int *A1 = (objc_string)0; // expected-warning {{aka 'id'}}
diff --git a/test/PCH/objc_import.m b/test/PCH/objc_import.m
index 12893861585aa..c109f4083660b 100644
--- a/test/PCH/objc_import.m
+++ b/test/PCH/objc_import.m
@@ -1,9 +1,9 @@
// Test this without pch.
-// RUN: clang-cc -include %S/objc_import.h -fsyntax-only -verify %s
+// RUN: clang -cc1 -include %S/objc_import.h -fsyntax-only -verify %s
// Test with pch.
-// RUN: clang-cc -x objective-c -emit-pch -o %t %S/objc_import.h
-// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s
+// RUN: clang -cc1 -x objective-c -emit-pch -o %t %S/objc_import.h
+// RUN: clang -cc1 -include-pch %t -fsyntax-only -verify %s
#import "objc_import.h"
diff --git a/test/PCH/objc_methods.m b/test/PCH/objc_methods.m
index 136e39706c82f..a60ffad4f2a15 100644
--- a/test/PCH/objc_methods.m
+++ b/test/PCH/objc_methods.m
@@ -1,9 +1,9 @@
// Test this without pch.
-// RUN: clang-cc -include %S/objc_methods.h -fsyntax-only -verify %s
+// RUN: clang -cc1 -include %S/objc_methods.h -fsyntax-only -verify %s
// Test with pch.
-// RUN: clang-cc -x objective-c -emit-pch -o %t %S/objc_methods.h
-// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s
+// RUN: clang -cc1 -x objective-c -emit-pch -o %t %S/objc_methods.h
+// RUN: clang -cc1 -include-pch %t -fsyntax-only -verify %s
void func() {
TestPCH *xx;
diff --git a/test/PCH/objc_property.m b/test/PCH/objc_property.m
index 5992787fa4222..17c3a729c5c65 100644
--- a/test/PCH/objc_property.m
+++ b/test/PCH/objc_property.m
@@ -1,9 +1,9 @@
// Test this without pch.
-// RUN: clang-cc -include %S/objc_property.h -fsyntax-only -verify %s
+// RUN: clang -cc1 -include %S/objc_property.h -fsyntax-only -verify %s
// Test with pch.
-// RUN: clang-cc -x objective-c -emit-pch -o %t %S/objc_property.h
-// RUN: clang-cc -include-pch %t -fsyntax-only -verify %s
+// RUN: clang -cc1 -x objective-c -emit-pch -o %t %S/objc_property.h
+// RUN: clang -cc1 -include-pch %t -fsyntax-only -verify %s
void func() {
TestProperties *xx = [TestProperties alloc];
diff --git a/test/PCH/source-manager-stack.c b/test/PCH/source-manager-stack.c
new file mode 100644
index 0000000000000..72084d9760edf
--- /dev/null
+++ b/test/PCH/source-manager-stack.c
@@ -0,0 +1,12 @@
+// Test that the source manager has the "proper" idea about the include stack
+// when using PCH.
+
+// RUN: echo 'int x;' > %t.prefix.h
+// RUN: not clang-cc -fsyntax-only -include %t.prefix.h %s 2> %t.diags.no_pch.txt
+// RUN: clang-cc -emit-pch -o %t.prefix.pch %t.prefix.h
+// RUN: not clang-cc -fsyntax-only -include-pch %t.prefix.pch %s 2> %t.diags.pch.txt
+// RUN: diff %t.diags.no_pch.txt %t.diags.pch.txt
+// XFAIL: *
+// PR5662
+
+float x;