blob: 324bd9958560a559e2dcf65493a00ce3a1109a13 [file] [log] [blame]
Ben Langmuir87ecb892014-08-12 16:42:25 +00001// RUN: rm -rf %t
Chandler Carruth2c93cb22013-09-20 21:12:25 +00002// RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 %s
Ben Langmuir87ecb892014-08-12 16:42:25 +00003// RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 -fmodules -fmodules-cache-path=%t %s
Richard Smith20d47012016-04-16 00:46:26 +00004// RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 -fmodules -fmodules-cache-path=%t -fmodules-local-submodule-visibility %s
Richard Smith8acb4042013-02-21 02:17:58 +00005
Alp Toker7591a052014-04-19 19:07:19 +00006// This test fails on systems with older OS X 10.9 SDK headers, see PR18322.
Nico Weber428a93b2013-12-24 20:48:13 +00007
Richard Smith8acb4042013-02-21 02:17:58 +00008#include <stdalign.h>
9
10#if defined alignas
11#error alignas should not be defined in C++
12#endif
13
14#if defined alignof
15#error alignof should not be defined in C++
16#endif
17
18static_assert(__alignas_is_defined, "");
19static_assert(__alignof_is_defined, "");
Richard Smith23628292013-04-12 22:11:07 +000020
21
22#include <stdint.h>
23
24#ifndef SIZE_MAX
25#error SIZE_MAX should be defined in C++
26#endif