diff options
-rw-r--r-- | test/Sema/attr-declspec-ignored.c | 24 | ||||
-rw-r--r-- | test/SemaCXX/attr-declspec-ignored.cpp | 38 |
2 files changed, 31 insertions, 31 deletions
diff --git a/test/Sema/attr-declspec-ignored.c b/test/Sema/attr-declspec-ignored.c index e1bce4726e..6fd35c0bd7 100644 --- a/test/Sema/attr-declspec-ignored.c +++ b/test/Sema/attr-declspec-ignored.c @@ -1,12 +1,12 @@ -// RUN: %clang_cc1 %s -verify -fsyntax-only
-
-__attribute__((visibility("hidden"))) __attribute__((aligned)) struct A; // expected-warning{{attribute 'visibility' is ignored, place it after "struct" to apply attribute to type declaration}} \
-// expected-warning{{attribute 'aligned' is ignored, place it after "struct" to apply attribute to type declaration}}
-__attribute__((visibility("hidden"))) __attribute__((aligned)) union B; // expected-warning{{attribute 'visibility' is ignored, place it after "union" to apply attribute to type declaration}} \
-// expected-warning{{attribute 'aligned' is ignored, place it after "union" to apply attribute to type declaration}}
-__attribute__((visibility("hidden"))) __attribute__((aligned)) enum C {C}; // expected-warning{{attribute 'visibility' is ignored, place it after "enum" to apply attribute to type declaration}} \
-// expected-warning{{attribute 'aligned' is ignored, place it after "enum" to apply attribute to type declaration}}
-
-__attribute__((visibility("hidden"))) __attribute__((aligned)) struct D {} d;
-__attribute__((visibility("hidden"))) __attribute__((aligned)) union E {} e;
-__attribute__((visibility("hidden"))) __attribute__((aligned)) enum F {F} f;
+// RUN: %clang_cc1 %s -verify -fsyntax-only + +__attribute__((visibility("hidden"))) __attribute__((aligned)) struct A; // expected-warning{{attribute 'visibility' is ignored, place it after "struct" to apply attribute to type declaration}} \ +// expected-warning{{attribute 'aligned' is ignored, place it after "struct" to apply attribute to type declaration}} +__attribute__((visibility("hidden"))) __attribute__((aligned)) union B; // expected-warning{{attribute 'visibility' is ignored, place it after "union" to apply attribute to type declaration}} \ +// expected-warning{{attribute 'aligned' is ignored, place it after "union" to apply attribute to type declaration}} +__attribute__((visibility("hidden"))) __attribute__((aligned)) enum C {C}; // expected-warning{{attribute 'visibility' is ignored, place it after "enum" to apply attribute to type declaration}} \ +// expected-warning{{attribute 'aligned' is ignored, place it after "enum" to apply attribute to type declaration}} + +__attribute__((visibility("hidden"))) __attribute__((aligned)) struct D {} d; +__attribute__((visibility("hidden"))) __attribute__((aligned)) union E {} e; +__attribute__((visibility("hidden"))) __attribute__((aligned)) enum F {F} f; diff --git a/test/SemaCXX/attr-declspec-ignored.cpp b/test/SemaCXX/attr-declspec-ignored.cpp index c6745c4e64..0503750da1 100644 --- a/test/SemaCXX/attr-declspec-ignored.cpp +++ b/test/SemaCXX/attr-declspec-ignored.cpp @@ -1,19 +1,19 @@ -// RUN: %clang_cc1 %s -verify -fsyntax-only
-
-namespace test1 {
- __attribute__((visibility("hidden"))) __attribute__((aligned)) class A; // expected-warning{{attribute 'visibility' is ignored, place it after "class" to apply attribute to type declaration}} \
- // expected-warning{{attribute 'aligned' is ignored, place it after "class" to apply attribute to type declaration}}
- __attribute__((visibility("hidden"))) __attribute__((aligned)) struct B; // expected-warning{{attribute 'visibility' is ignored, place it after "struct" to apply attribute to type declaration}} \
- // expected-warning{{attribute 'aligned' is ignored, place it after "struct" to apply attribute to type declaration}}
- __attribute__((visibility("hidden"))) __attribute__((aligned)) union C; // expected-warning{{attribute 'visibility' is ignored, place it after "union" to apply attribute to type declaration}} \
- // expected-warning{{attribute 'aligned' is ignored, place it after "union" to apply attribute to type declaration}}
- __attribute__((visibility("hidden"))) __attribute__((aligned)) enum D {D}; // expected-warning{{attribute 'visibility' is ignored, place it after "enum" to apply attribute to type declaration}} \
- // expected-warning{{attribute 'aligned' is ignored, place it after "enum" to apply attribute to type declaration}}
-}
-
-namespace test2 {
- __attribute__((visibility("hidden"))) __attribute__((aligned)) class A {} a;
- __attribute__((visibility("hidden"))) __attribute__((aligned)) struct B {} b;
- __attribute__((visibility("hidden"))) __attribute__((aligned)) union C {} c;
- __attribute__((visibility("hidden"))) __attribute__((aligned)) enum D {D} d;
-}
+// RUN: %clang_cc1 %s -verify -fsyntax-only + +namespace test1 { + __attribute__((visibility("hidden"))) __attribute__((aligned)) class A; // expected-warning{{attribute 'visibility' is ignored, place it after "class" to apply attribute to type declaration}} \ + // expected-warning{{attribute 'aligned' is ignored, place it after "class" to apply attribute to type declaration}} + __attribute__((visibility("hidden"))) __attribute__((aligned)) struct B; // expected-warning{{attribute 'visibility' is ignored, place it after "struct" to apply attribute to type declaration}} \ + // expected-warning{{attribute 'aligned' is ignored, place it after "struct" to apply attribute to type declaration}} + __attribute__((visibility("hidden"))) __attribute__((aligned)) union C; // expected-warning{{attribute 'visibility' is ignored, place it after "union" to apply attribute to type declaration}} \ + // expected-warning{{attribute 'aligned' is ignored, place it after "union" to apply attribute to type declaration}} + __attribute__((visibility("hidden"))) __attribute__((aligned)) enum D {D}; // expected-warning{{attribute 'visibility' is ignored, place it after "enum" to apply attribute to type declaration}} \ + // expected-warning{{attribute 'aligned' is ignored, place it after "enum" to apply attribute to type declaration}} +} + +namespace test2 { + __attribute__((visibility("hidden"))) __attribute__((aligned)) class A {} a; + __attribute__((visibility("hidden"))) __attribute__((aligned)) struct B {} b; + __attribute__((visibility("hidden"))) __attribute__((aligned)) union C {} c; + __attribute__((visibility("hidden"))) __attribute__((aligned)) enum D {D} d; +} |