diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-01-16 08:21:25 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-01-16 08:21:25 +0000 |
| commit | 2ff698df60d76cc7fdbd3b6d72ce5b8615b234e6 (patch) | |
| tree | 3e2ec3de57fddca70708aadbf0b728a64310e2cc /clang/test/Preprocessor | |
| parent | 8a42586c54f6ec33b657d2c052740fdb52ce3a6c (diff) | |
| download | bcm5719-llvm-2ff698df60d76cc7fdbd3b6d72ce5b8615b234e6.tar.gz bcm5719-llvm-2ff698df60d76cc7fdbd3b6d72ce5b8615b234e6.zip | |
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.
llvm-svn: 62317
Diffstat (limited to 'clang/test/Preprocessor')
| -rw-r--r-- | clang/test/Preprocessor/pragma_microsoft.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/pragma_microsoft.c b/clang/test/Preprocessor/pragma_microsoft.c new file mode 100644 index 00000000000..7a05bbcfcfc --- /dev/null +++ b/clang/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}} + |

