From 36c49e3f258dced101949edabd72e9bc3f1dedc4 Mon Sep 17 00:00:00 2001 From: dim Date: Fri, 17 Sep 2010 15:54:40 +0000 Subject: Vendor import of clang r114020 (from the release_28 branch): http://llvm.org/svn/llvm-project/cfe/branches/release_28@114020 Approved by: rpaulo (mentor) --- test/SemaTemplate/instantiate-attr.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/SemaTemplate/instantiate-attr.cpp') diff --git a/test/SemaTemplate/instantiate-attr.cpp b/test/SemaTemplate/instantiate-attr.cpp index e8291ed..bbadb63 100644 --- a/test/SemaTemplate/instantiate-attr.cpp +++ b/test/SemaTemplate/instantiate-attr.cpp @@ -11,3 +11,16 @@ struct A { int a[sizeof(A) == 16 ? 1 : -1]; int a2[sizeof(A::B) == 16 ? 1 : -1]; +// rdar://problem/8243419 +namespace test1 { + template struct A { + int a; + T b[0]; + } __attribute__((packed)); + + typedef A type; + + int test0[sizeof(type) == 4 ? 1 : -1]; + int test1[__builtin_offsetof(type, a) == 0 ? 1 : -1]; + int test2[__builtin_offsetof(type, b) == 4 ? 1 : -1]; +} -- cgit v1.1