diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2012-06-19 13:49:26 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2012-06-19 13:49:26 +0000 |
commit | ed35fd1c6db1680b4526ba64c94e5da6ec203be7 (patch) | |
tree | 18ac8c2240de3141ff98114ea78325435b42ab93 /test/Sema/MicrosoftCompatibility.c | |
parent | c20c4e79ae1957ec5a88d7653a0aeda24b67ae3a (diff) |
Improves parsing and semantic analysis for MS __declspec attributes. This includes support for the align (which fixes PR12631).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158717 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/MicrosoftCompatibility.c')
-rw-r--r-- | test/Sema/MicrosoftCompatibility.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/Sema/MicrosoftCompatibility.c b/test/Sema/MicrosoftCompatibility.c index f148e869ff..6b137a60c4 100644 --- a/test/Sema/MicrosoftCompatibility.c +++ b/test/Sema/MicrosoftCompatibility.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 %s -fsyntax-only -Wno-unused-value -Wmicrosoft -verify -fms-compatibility -enum ENUM1; // expected-warning {{forward references to 'enum' types are a Microsoft extension}} +enum ENUM1; // expected-warning {{forward references to 'enum' types are a Microsoft extension}} enum ENUM1 var1 = 3; enum ENUM1* var2 = 0; @@ -14,3 +14,8 @@ enum ENUM2 { __declspec(noreturn) void f6( void ) { return; // expected-warning {{function 'f6' declared 'noreturn' should not return}} } + +__declspec(align(32768)) struct S1 { int a; } s; /* expected-error {{requested alignment must be 8192 bytes or smaller}} */ +struct __declspec(aligned) S2 {}; /* expected-warning {{unknown __declspec attribute 'aligned' ignored}} */ + +struct __declspec(appdomain) S3 {}; /* expected-warning {{__declspec attribute 'appdomain' is not supported}} */
\ No newline at end of file |