summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/attr-lto-visibility-public.cpp
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/SemaCXX/attr-lto-visibility-public.cpp
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/SemaCXX/attr-lto-visibility-public.cpp')
-rw-r--r--clang/test/SemaCXX/attr-lto-visibility-public.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/test/SemaCXX/attr-lto-visibility-public.cpp b/clang/test/SemaCXX/attr-lto-visibility-public.cpp
index 2f9ed87f6ee..42e0f79279d 100644
--- a/clang/test/SemaCXX/attr-lto-visibility-public.cpp
+++ b/clang/test/SemaCXX/attr-lto-visibility-public.cpp
@@ -1,13 +1,13 @@
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
-int i [[clang::lto_visibility_public]]; // expected-warning {{'lto_visibility_public' attribute only applies to struct, union or class}}
-typedef int t [[clang::lto_visibility_public]]; // expected-warning {{'lto_visibility_public' attribute only applies to struct, union or class}}
-[[clang::lto_visibility_public]] void f(); // expected-warning {{'lto_visibility_public' attribute only applies to struct, union or class}}
+int i [[clang::lto_visibility_public]]; // expected-warning {{'lto_visibility_public' attribute only applies to structs, unions, and classes}}
+typedef int t [[clang::lto_visibility_public]]; // expected-warning {{'lto_visibility_public' attribute only applies to}}
+[[clang::lto_visibility_public]] void f(); // expected-warning {{'lto_visibility_public' attribute only applies to}}
void f() [[clang::lto_visibility_public]]; // expected-error {{'lto_visibility_public' attribute cannot be applied to types}}
struct [[clang::lto_visibility_public]] s1 {
- int i [[clang::lto_visibility_public]]; // expected-warning {{'lto_visibility_public' attribute only applies to struct, union or class}}
- [[clang::lto_visibility_public]] void f(); // expected-warning {{'lto_visibility_public' attribute only applies to struct, union or class}}
+ int i [[clang::lto_visibility_public]]; // expected-warning {{'lto_visibility_public' attribute only applies to}}
+ [[clang::lto_visibility_public]] void f(); // expected-warning {{'lto_visibility_public' attribute only applies to}}
};
struct [[clang::lto_visibility_public(1)]] s2 { // expected-error {{'lto_visibility_public' attribute takes no arguments}}
OpenPOWER on IntegriCloud