diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2013-11-20 22:22:04 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2013-11-20 22:22:04 +0000 |
commit | b80f94b41cdcfa5f9cc17f4ffbfc02ecd654ef2a (patch) | |
tree | 1971023a58ac62697e46557d6dc875fcc73f699c /clang/test/Sema/pragma-ms_struct.c | |
parent | f8b41867c8adef1f2352477d84859fbeccdffdb5 (diff) | |
download | bcm5719-llvm-b80f94b41cdcfa5f9cc17f4ffbfc02ecd654ef2a.tar.gz bcm5719-llvm-b80f94b41cdcfa5f9cc17f4ffbfc02ecd654ef2a.zip |
There is no such thing as __declspec(ms_struct), this is a GNU attribute. Switched the attribute to have the proper spelling, gave it a subject, updated the warning to be more accurate, and updated the test case as appropriate.
llvm-svn: 195277
Diffstat (limited to 'clang/test/Sema/pragma-ms_struct.c')
-rw-r--r-- | clang/test/Sema/pragma-ms_struct.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/test/Sema/pragma-ms_struct.c b/clang/test/Sema/pragma-ms_struct.c index 6533320e518..14e7fde8b98 100644 --- a/clang/test/Sema/pragma-ms_struct.c +++ b/clang/test/Sema/pragma-ms_struct.c @@ -25,7 +25,7 @@ struct { } __attribute__((__ms_struct__)) t1; struct S { - double __attribute__((ms_struct)) d; // expected-warning {{'ms_struct' attribute ignored}} + double __attribute__((ms_struct)) d; // expected-warning {{'ms_struct' attribute only applies to struct, union or class}} unsigned long bf_1 : 12; unsigned long : 0; unsigned long bf_2 : 12; @@ -36,7 +36,7 @@ enum A = 0, B, C -} __attribute__((ms_struct)) e1; // expected-warning {{'ms_struct' attribute ignored}} +} __attribute__((ms_struct)) e1; // expected-warning {{'ms_struct' attribute only applies to struct, union or class}} // rdar://10513599 #pragma ms_struct on @@ -52,10 +52,12 @@ typedef struct void *pv1; Foo foo; unsigned short fInited : 1; -void *pv2; -} PackOddity; +void *pv2; +} PackOddity; #pragma ms_struct off static int arr[sizeof(PackOddity) == 40 ? 1 : -1]; +__declspec(ms_struct) struct bad { // expected-warning {{unknown __declspec attribute 'ms_struct' ignored}} +}; |