aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/attributes.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-05-19 03:39:53 +0000
committerDouglas Gregor <dgregor@apple.com>2010-05-19 03:39:53 +0000
commit7d2bcc74fd32875b737dabe3b4f867fe4c907ca0 (patch)
tree234c62ba3cf367affaea17e6df6950c19737b31f /test/SemaTemplate/attributes.cpp
parent26bcf67d0156e2aec6ea184f8c2fb6186ec7b1e3 (diff)
Teach clang to instantiate attributes on more declarations. Fixes PR7102.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104106 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/attributes.cpp')
-rw-r--r--test/SemaTemplate/attributes.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/SemaTemplate/attributes.cpp b/test/SemaTemplate/attributes.cpp
index b696c5cd98..c578faba31 100644
--- a/test/SemaTemplate/attributes.cpp
+++ b/test/SemaTemplate/attributes.cpp
@@ -6,3 +6,24 @@ struct X {
int __attribute__((__address_space__(N))) *ptr; // expected-error{{attribute requires 1 argument(s)}}
};
+
+namespace PR7102 {
+
+ class NotTpl {
+ public:
+ union {
+ char space[11];
+ void* ptr;
+ } __attribute__((packed));
+ };
+ template<unsigned N>
+ class Tpl {
+ public:
+ union {
+ char space[N];
+ void* ptr;
+ } __attribute__((packed));
+ };
+
+ int array[sizeof(NotTpl) == sizeof(Tpl<11>)? 1 : -1];
+}