Implement basic support for parsing #pragma comment, a microsoft extension
documented here:
http://msdn.microsoft.com/en-us/library/7f0aews7(VS.80).aspx

This is according to my understanding reading the docs, I don't know if it
really agrees fully with what VC++ allows.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62317 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Preprocessor/pragma_microsoft.c b/test/Preprocessor/pragma_microsoft.c
new file mode 100644
index 0000000..7a05bbc
--- /dev/null
+++ b/test/Preprocessor/pragma_microsoft.c
@@ -0,0 +1,18 @@
+// RUN: clang %s -fsyntax-only -verify -fms-extensions
+
+// rdar://6495941
+
+#define FOO 1
+#define BAR "2"
+
+#pragma comment(linker,"foo=" FOO) // expected-error {{pragma comment requires parenthesized identifier and optional string}}
+#pragma comment(linker," bar=" BAR)
+
+#pragma comment( user, "Compiled on " __DATE__ " at " __TIME__ ) 
+
+#pragma comment(foo)    // expected-error {{unknown kind of pragma comment}}
+#pragma comment(compiler,)     // expected-error {{pragma comment requires}}
+#define foo compiler
+#pragma comment(foo)   // macro expand kind?
+#pragma comment(foo) x // expected-error {{pragma comment requires}}
+