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
diff --git a/test/Driver/ccc-as-cpp.c b/test/Driver/ccc-as-cpp.c
new file mode 100644
index 0000000..feead51
--- /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