[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Headers / cxx11.cpp
blob324bd9958560a559e2dcf65493a00ce3a1109a13
1 // RUN: rm -rf %t
2 // RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 %s
3 // RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 -fmodules -fmodules-cache-path=%t %s
4 // RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 -fmodules -fmodules-cache-path=%t -fmodules-local-submodule-visibility %s
6 // This test fails on systems with older OS X 10.9 SDK headers, see PR18322.
8 #include <stdalign.h>
10 #if defined alignas
11 #error alignas should not be defined in C++
12 #endif
14 #if defined alignof
15 #error alignof should not be defined in C++
16 #endif
18 static_assert(__alignas_is_defined, "");
19 static_assert(__alignof_is_defined, "");
22 #include <stdint.h>
24 #ifndef SIZE_MAX
25 #error SIZE_MAX should be defined in C++
26 #endif