diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-07-06 20:04:10 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-07-06 20:04:10 +0000 |
commit | 1c8a5d75f117dfd15ea84d0c2b375b822b2eeba7 (patch) | |
tree | 68085ba85516e67625db5c8795f3a3c04bc4ff96 /clang/test/Parser/MicrosoftExtensions.cpp | |
parent | f21ba37f1b13d4eb3f9f25a49c5e3b965c647e61 (diff) | |
download | bcm5719-llvm-1c8a5d75f117dfd15ea84d0c2b375b822b2eeba7.tar.gz bcm5719-llvm-1c8a5d75f117dfd15ea84d0c2b375b822b2eeba7.zip |
The MicrosoftExtensions.c test file should not rely on -x objective-c++. Removed that from the RUN line, fixed obvious C++isms in the code, and moved some C++ tests into MicrosoftExtensions.cpp instead. As a drive-by, changed the line endings for MicrosoftExtensions.c to be LF instead of CRLF.
llvm-svn: 212417
Diffstat (limited to 'clang/test/Parser/MicrosoftExtensions.cpp')
-rw-r--r-- | clang/test/Parser/MicrosoftExtensions.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/clang/test/Parser/MicrosoftExtensions.cpp b/clang/test/Parser/MicrosoftExtensions.cpp index 076de7cd785..f41e5ec29ee 100644 --- a/clang/test/Parser/MicrosoftExtensions.cpp +++ b/clang/test/Parser/MicrosoftExtensions.cpp @@ -332,3 +332,28 @@ void TestProperty() { //expected-warning@+1 {{C++ operator 'and' (aka '&&') used as a macro name}} #define and foo + +struct __declspec(uuid("00000000-0000-0000-C000-000000000046")) __declspec(novtable) IUnknown {}; // expected-warning{{__declspec attribute 'novtable' is not supported}} + +typedef bool (__stdcall __stdcall *blarg)(int); + +void local_callconv() { + bool (__stdcall *p)(int); +} + +struct S7 { + int foo() { return 12; } + __declspec(property(get=foo) deprecated) int t; // expected-note {{'t' has been explicitly marked deprecated here}} +}; + +// Technically, this is legal (though it does nothing) +__declspec() void quux( void ) { + struct S7 s; + int i = s.t; // expected-warning {{'t' is deprecated}} +} + +void *_alloca(int); + +void foo(void) { + __declspec(align(16)) int *buffer = (int *)_alloca(9); +} |