[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / align-x86-abi7.cpp
blob3088a13f78577e5dd7fc484a9a15ea8b0dd1cc3e
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 {
8 using type = T;
9 static type value;
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");
16 // PR3433
17 template struct check_alignment<double, 8>;
18 template struct check_alignment<long long, 8>;
19 template struct check_alignment<unsigned long long, 8>;
21 // PR6362
22 template struct check_alignment<double[3], 8>;
24 enum big_enum { x = 18446744073709551615ULL };
25 template struct check_alignment<big_enum, 8>;