summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/attributes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/attributes.cpp')
-rw-r--r--test/SemaTemplate/attributes.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaTemplate/attributes.cpp b/test/SemaTemplate/attributes.cpp
new file mode 100644
index 0000000..b696c5c
--- /dev/null
+++ b/test/SemaTemplate/attributes.cpp
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+template<int N>
+struct X {
+ struct __attribute__((__aligned__((N)))) Aligned { }; // expected-error{{'aligned' attribute requires integer constant}}
+
+ int __attribute__((__address_space__(N))) *ptr; // expected-error{{attribute requires 1 argument(s)}}
+};
OpenPOWER on IntegriCloud