]> granicus.if.org Git - clang/commitdiff
Forbid driver use in Sema tests
authorAlp Toker <alp@nuanti.com>
Thu, 16 Jan 2014 02:37:08 +0000 (02:37 +0000)
committerAlp Toker <alp@nuanti.com>
Thu, 16 Jan 2014 02:37:08 +0000 (02:37 +0000)
This ports the last Sema tests over to use the frontend directly, and adds a
local lit substitution to disable inappropriate %clang usage under this
directory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199348 91177308-0d34-0410-b5e6-96231b3b80d8

test/Headers/carbon.c [moved from test/Sema/carbon.c with 100% similarity]
test/Sema/lit.local.cfg [new file with mode: 0644]
test/Sema/pragma-pack-apple.c
test/Sema/return.c
test/Sema/transparent-union.c
test/Sema/warn-missing-variable-declarations.c
test/Sema/warn-unreachable.c
test/Sema/wchar.c

similarity index 100%
rename from test/Sema/carbon.c
rename to test/Headers/carbon.c
diff --git a/test/Sema/lit.local.cfg b/test/Sema/lit.local.cfg
new file mode 100644 (file)
index 0000000..f4ef5d2
--- /dev/null
@@ -0,0 +1,4 @@
+config.substitutions = list(config.substitutions)
+config.substitutions.insert(0,
+    (r'%clang\b',
+     """*** Do not use the driver in Sema tests. ***""") )
index 5b33c03c38e773cf90649c5601518492ac82c4e8..426d984e8ae773edc717a26b2afc9b8ba1f1810f 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang -fsyntax-only %s 2>&1 | FileCheck %s
-// RUN: %clang -fsyntax-only -fapple-pragma-pack %s 2>&1 | FileCheck -check-prefix=CHECK-APPLE %s
+// RUN: %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck %s
+// RUN: %clang_cc1 -fsyntax-only -fapple-pragma-pack %s 2>&1 | FileCheck -check-prefix=CHECK-APPLE %s
 
 #pragma pack(push,1)
 #pragma pack(2)
index 7e7c8b7b844e095fdba98276c6976df47c8d0aae..cfdbe0c5d4ba123e7cc5822d9565017587f862ae 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang %s -fsyntax-only -Wignored-qualifiers -Wno-error=return-type -Xclang -verify -fblocks -Wno-unreachable-code -Wno-unused-value
+// RUN: %clang_cc1 %s -fsyntax-only -Wignored-qualifiers -Wno-error=return-type -verify -fblocks -Wno-unreachable-code -Wno-unused-value
 
 // clang emits the following warning by default.
 // With GCC, -pedantic, -Wreturn-type or -Wall are required to produce the 
index ab1ba1867f47b00ad962c65d5cc3e67ef7ecd227..bbe0a32d4830a9238f43cc42b781407261760e6f 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang -fsyntax-only -Xclang -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
 typedef union {
   int *ip;
   float *fp;
index 631d3d213b01f342ff90a72adf6a30d4a41a52b8..e5ce97da2164ee660788bf2528b9defee8825ad7 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang -Wmissing-variable-declarations -fsyntax-only -Xclang -verify %s
+// RUN: %clang_cc1 -Wmissing-variable-declarations -fsyntax-only -verify %s
 
 int vbad1; // expected-warning{{no previous extern declaration for non-static variable 'vbad1'}}
 
index fd74b5c87175e5098c4d34aaf696dd60776548c8..197645212d44d2be211d21d87f43e5f776a66262 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang %s -fsyntax-only -Xclang -verify -fblocks -Wunreachable-code -Wno-unused-value -Wno-covered-switch-default
+// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks -Wunreachable-code -Wno-unused-value -Wno-covered-switch-default
 
 int halt() __attribute__((noreturn));
 int live();
index 13c2f5855d5ea1c9ea72639da96d86dcd64847b4..74e482a2a0f8390cedfab8ebdbc3bfbddd51a415 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang %s -fsyntax-only -Xclang -verify
-// RUN: %clang %s -fsyntax-only -fshort-wchar -Xclang -verify -DSHORT_WCHAR
+// RUN: %clang_cc1 %s -fsyntax-only -verify
+// RUN: %clang_cc1 %s -fsyntax-only -fshort-wchar -verify -DSHORT_WCHAR
 
 typedef __WCHAR_TYPE__ wchar_t;