summaryrefslogtreecommitdiffstats
path: root/clang/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
commit21553f5970988bd77963e8969852dc4d409dded1 (patch)
tree77391d8fa2fccb945b4d7e706d7635dc2142a4a8 /clang/test/SemaTemplate/attributes.cpp
parentcbfbca14d0a2b71d9fd1691d7d47c34df78d752d (diff)
downloadbcm5719-llvm-21553f5970988bd77963e8969852dc4d409dded1.tar.gz
bcm5719-llvm-21553f5970988bd77963e8969852dc4d409dded1.zip
Teach clang to instantiate attributes on more declarations. Fixes PR7102.
llvm-svn: 104106
Diffstat (limited to 'clang/test/SemaTemplate/attributes.cpp')
-rw-r--r--clang/test/SemaTemplate/attributes.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/attributes.cpp b/clang/test/SemaTemplate/attributes.cpp
index b696c5cd984..c578faba31a 100644
--- a/clang/test/SemaTemplate/attributes.cpp
+++ b/clang/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];
+}
OpenPOWER on IntegriCloud