summaryrefslogtreecommitdiff
path: root/test/Driver/ccc-as-cpp.c
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-08-06 04:09:06 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-08-06 04:09:06 +0000
commit04c3a25bd45ad8a6ad715783aee03df7284c5591 (patch)
tree7156f3c08f6f0c4f949ff549f9e9f203c1c1e6ff /test/Driver/ccc-as-cpp.c
parenta4b39658673954fb9f75673594b50028685fc665 (diff)
downloadclang-04c3a25bd45ad8a6ad715783aee03df7284c5591.tar.gz
PR13529: Don't crash if the driver sees an unused input file when running as
'clang-cpp'. For now, the test uses "REQUIRES: shell" to determine if the host system supports "ln -s", which it uses to create a 'clang-cpp' symlink. This is a bit hacky and should likely be directly supported by lit.cfg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161317 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/ccc-as-cpp.c')
-rw-r--r--test/Driver/ccc-as-cpp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Driver/ccc-as-cpp.c b/test/Driver/ccc-as-cpp.c
new file mode 100644
index 0000000000..feead5191d
--- /dev/null
+++ b/test/Driver/ccc-as-cpp.c
@@ -0,0 +1,6 @@
+// REQUIRES: shell
+// RUN: ln -sf %clang %T/clang-cpp
+
+// PR13529: Don't crash.
+// RUN: %T/clang-cpp -lfoo -M %s 2>&1 | FileCheck --check-prefix=CHECK-PR13529 %s
+// CHECK-PR13529: warning: -lfoo: 'linker' input unused in cpp mode