2016-04-29 01:09:37 +08:00
|
|
|
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
|
|
|
|
|
2017-11-27 04:01:12 +08:00
|
|
|
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}}
|
2016-04-29 01:09:37 +08:00
|
|
|
void f() [[clang::lto_visibility_public]]; // expected-error {{'lto_visibility_public' attribute cannot be applied to types}}
|
|
|
|
|
|
|
|
struct [[clang::lto_visibility_public]] s1 {
|
2017-11-27 04:01:12 +08:00
|
|
|
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}}
|
2016-04-29 01:09:37 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct [[clang::lto_visibility_public(1)]] s2 { // expected-error {{'lto_visibility_public' attribute takes no arguments}}
|
|
|
|
};
|