summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/pragma-ms_struct.c
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2017-11-26 20:01:12 +0000
committerAaron Ballman <aaron@aaronballman.com>2017-11-26 20:01:12 +0000
commitadf66b617461c250ad75163c938a1887a47adafb (patch)
tree2fa25db52e8db8687c8cbe2a7aac93c2235af22c /clang/test/Sema/pragma-ms_struct.c
parent9d68565262401bd9d26c69ec496e76e92616d8df (diff)
downloadbcm5719-llvm-adf66b617461c250ad75163c938a1887a47adafb.tar.gz
bcm5719-llvm-adf66b617461c250ad75163c938a1887a47adafb.zip
Determine the attribute subject for diagnostics based on declarative information in DeclNodes.td. This greatly reduces the number of enumerated values used for more complex diagnostics; these are now only required when the "attribute only applies to" diagnostic needs to be generated manually as part of semantic processing.
This also clarifies some terminology used by the diagnostic (methods -> Objective-C methods, fields -> non-static data members, etc). Many of the tests needed to be updated in multiple places for the diagnostic wording tweaks. The first instance of the diagnostic for that attribute is fully specified and subsequent instances cut off the complete list (to make it easier if additional subjects are added in the future for the attribute). llvm-svn: 319002
Diffstat (limited to 'clang/test/Sema/pragma-ms_struct.c')
-rw-r--r--clang/test/Sema/pragma-ms_struct.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Sema/pragma-ms_struct.c b/clang/test/Sema/pragma-ms_struct.c
index a2591b6a4c4..e10d49e6761 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 only applies to struct or union}}
+ double __attribute__((ms_struct)) d; // expected-warning {{'ms_struct' attribute only applies to structs, unions, and classes}}
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 only applies to struct or union}}
+} __attribute__((ms_struct)) e1; // expected-warning {{'ms_struct' attribute only applies to}}
// rdar://10513599
#pragma ms_struct on
OpenPOWER on IntegriCloud