summaryrefslogtreecommitdiffstats
path: root/test/Driver/cl-inputs.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
committerdim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
commit952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch)
treedf8df0b0067b381eab470a3b8f28d14a552a6340 /test/Driver/cl-inputs.c
parentea266cad53e3d49771fa38103913d3ec7a166694 (diff)
downloadFreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip
FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'test/Driver/cl-inputs.c')
-rw-r--r--test/Driver/cl-inputs.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/Driver/cl-inputs.c b/test/Driver/cl-inputs.c
new file mode 100644
index 0000000..d6ee520
--- /dev/null
+++ b/test/Driver/cl-inputs.c
@@ -0,0 +1,35 @@
+// Don't attempt slash switches on msys bash.
+// REQUIRES: shell-preserves-root
+
+// Note: %s must be preceded by --, otherwise it may be interpreted as a
+// command-line option, e.g. on Mac where %s is commonly under /Users.
+
+// RUN: %clang_cl /TC -### -- %s 2>&1 | FileCheck -check-prefix=TC %s
+// TC: "-x" "c"
+// TC-NOT: warning
+// TC-NOT: note
+
+// RUN: %clang_cl /TP -### -- %s 2>&1 | FileCheck -check-prefix=TP %s
+// TP: "-x" "c++"
+// TP-NOT: warning
+// TP-NOT: note
+
+// RUN: %clang_cl -### /Tc%s /TP -- %s 2>&1 | FileCheck -check-prefix=Tc %s
+// RUN: %clang_cl -### /TP /Tc%s -- %s 2>&1 | FileCheck -check-prefix=Tc %s
+// Tc: "-x" "c"
+// Tc: "-x" "c++"
+// Tc-NOT: warning
+// Tc-NOT: note
+
+// RUN: %clang_cl -### /Tp%s /TC -- %s 2>&1 | FileCheck -check-prefix=Tp %s
+// RUN: %clang_cl -### /TC /Tp%s -- %s 2>&1 | FileCheck -check-prefix=Tp %s
+// Tp: "-x" "c++"
+// Tp: "-x" "c"
+// Tp-NOT: warning
+// Tp-NOT: note
+
+// RUN: %clang_cl /TP /TC /TP -### -- %s 2>&1 | FileCheck -check-prefix=WARN %s
+// WARN: warning: overriding '/TP' option with '/TC'
+// WARN: warning: overriding '/TC' option with '/TP'
+// WARN: note: The last /TC or /TP option takes precedence over earlier instances
+// WARN-NOT: note
OpenPOWER on IntegriCloud