summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Parser/cxx-attributes.cpp6
-rw-r--r--clang/test/Sema/mips16_attr_allowed.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/clang/test/Parser/cxx-attributes.cpp b/clang/test/Parser/cxx-attributes.cpp
index 97380521f87..3c99ccdb3a7 100644
--- a/clang/test/Parser/cxx-attributes.cpp
+++ b/clang/test/Parser/cxx-attributes.cpp
@@ -11,3 +11,9 @@ template <typename T> class X {
template <typename S> void X<S>::f() __attribute__((locks_excluded())); // expected-error{{nested name specifier 'X<S>::' for declaration does not refer into a class, class template or class template partial specialization}} \
// expected-warning{{attribute locks_excluded ignored, because it is not attached to a declaration}}
};
+
+namespace PR17666 {
+ const int A = 1;
+ typedef int __attribute__((__aligned__(A))) T1;
+ int check1[__alignof__(T1) == 1 ? 1 : -1];
+}
diff --git a/clang/test/Sema/mips16_attr_allowed.c b/clang/test/Sema/mips16_attr_allowed.c
index 58b4a865a22..c712e902f5f 100644
--- a/clang/test/Sema/mips16_attr_allowed.c
+++ b/clang/test/Sema/mips16_attr_allowed.c
@@ -13,8 +13,8 @@ void foo16_();
void foo32__() __attribute__((nomips16));
void foo32__() __attribute__((mips16));
-void foo32a() __attribute__((nomips16(xyz))) ; // expected-error {{'nomips16' attribute takes no arguments}}
-void __attribute__((mips16(xyz))) foo16a(); // expected-error {{'mips16' attribute takes no arguments}}
+void foo32a() __attribute__((nomips16(0))) ; // expected-error {{'nomips16' attribute takes no arguments}}
+void __attribute__((mips16(1))) foo16a(); // expected-error {{'mips16' attribute takes no arguments}}
void __attribute__((nomips16(1, 2))) foo32b(); // expected-error {{'nomips16' attribute takes no arguments}}
void __attribute__((mips16(1, 2))) foo16b(); // expected-error {{'mips16' attribute takes no arguments}}
OpenPOWER on IntegriCloud