Driver: Fix PR4062 by dissecting one particular -Wp, form.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105966 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Driver/Wp-args.c b/test/Driver/Wp-args.c
new file mode 100644
index 0000000..e072263
--- /dev/null
+++ b/test/Driver/Wp-args.c
@@ -0,0 +1,13 @@
+// Check that we extract -MD from '-Wp,-MD,FOO', which is used by a number of
+// major projects (e.g., FireFox and the Linux Kernel).
+
+// RUN: %clang --ccc-host-triple i386-pc-linux-gnu -### \
+// RUN:   -Wp,-MD,FOO.d -fsyntax-only %s 2> %t
+// RUN: FileCheck < %t %s
+//
+// CHECK: "-cc1"
+// CHECK-NOT: -MD
+// CHECK: "-dependency-file" "FOO.d"
+// CHECK: "-MT"
+//
+// PR4062