summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/MicrosoftExtensions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Parser/MicrosoftExtensions.cpp')
-rw-r--r--clang/test/Parser/MicrosoftExtensions.cpp25
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);
+}
OpenPOWER on IntegriCloud