1 // RUN: %clang_cc1 -std=c++11 -triple i386-apple-darwin9 -fsyntax-only -verify -fclang-abi-compat=7 %s
2 // expected-no-diagnostics
4 using size_t = decltype(sizeof(0));
6 template <typename T
, size_t Preferred
>
7 struct check_alignment
{
11 static_assert(__alignof__(value
) == Preferred
, "__alignof__(value) != Preferred");
12 static_assert(__alignof__(type
) == Preferred
, "__alignof__(type) != Preferred");
13 static_assert(alignof(type
) == Preferred
, "alignof(type) != Preferred");
17 template struct check_alignment
<double, 8>;
18 template struct check_alignment
<long long, 8>;
19 template struct check_alignment
<unsigned long long, 8>;
22 template struct check_alignment
<double[3], 8>;
24 enum big_enum
{ x
= 18446744073709551615ULL };
25 template struct check_alignment
<big_enum
, 8>;