]> granicus.if.org Git - clang/commitdiff
Add driver test for multiple preprocessor inputs
authorAlp Toker <alp@nuanti.com>
Mon, 24 Feb 2014 08:17:02 +0000 (08:17 +0000)
committerAlp Toker <alp@nuanti.com>
Mon, 24 Feb 2014 08:17:02 +0000 (08:17 +0000)
Fix an unintentional stdin read in the darwin-asan-nofortify.c test and replace
it with an explicit test for multiple -E inputs passed to the driver.

Noticed while working on the in-process driver patch.

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

test/Driver/darwin-asan-nofortify.c
test/Driver/preprocess-multiple.c [new file with mode: 0644]

index 7f325e097b383dcf88ccb91598b5f1baff6f1ad2..2c20aebd2de480eadd07b15a66fe01d473e28046 100644 (file)
@@ -1,6 +1,6 @@
 // Make sure AddressSanitizer disables _FORTIFY_SOURCE on Darwin.
 
-// RUN: %clang -faddress-sanitizer %s -E -dM -target x86_64-darwin | FileCheck %s
-// RUN: %clang -fsanitize=address  %s -E -dM -target x86_64-darwin | FileCheck %s
+// RUN: %clang -faddress-sanitizer %s -E -dM -target x86_64-darwin | FileCheck %s
+// RUN: %clang -fsanitize=address  %s -E -dM -target x86_64-darwin | FileCheck %s
 
 // CHECK: #define _FORTIFY_SOURCE 0
diff --git a/test/Driver/preprocess-multiple.c b/test/Driver/preprocess-multiple.c
new file mode 100644 (file)
index 0000000..9f87d3d
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: %clang -E %s %s | FileCheck %s
+// Test that the driver can preprocess multiple files.
+
+X
+// CHECK: X
+// CHECK: X