Ben Langmuir | 87ecb89 | 2014-08-12 16:42:25 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
Chandler Carruth | 2c93cb2 | 2013-09-20 21:12:25 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 %s |
Ben Langmuir | 87ecb89 | 2014-08-12 16:42:25 +0000 | [diff] [blame] | 3 | // RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 -fmodules -fmodules-cache-path=%t %s |
Richard Smith | 20d4701 | 2016-04-16 00:46:26 +0000 | [diff] [blame] | 4 | // RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 -fmodules -fmodules-cache-path=%t -fmodules-local-submodule-visibility %s |
Richard Smith | 8acb404 | 2013-02-21 02:17:58 +0000 | [diff] [blame] | 5 | |
Alp Toker | 7591a05 | 2014-04-19 19:07:19 +0000 | [diff] [blame] | 6 | // This test fails on systems with older OS X 10.9 SDK headers, see PR18322. |
Nico Weber | 428a93b | 2013-12-24 20:48:13 +0000 | [diff] [blame] | 7 | |
Richard Smith | 8acb404 | 2013-02-21 02:17:58 +0000 | [diff] [blame] | 8 | #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 | |
| 18 | static_assert(__alignas_is_defined, ""); |
| 19 | static_assert(__alignof_is_defined, ""); |
Richard Smith | 2362829 | 2013-04-12 22:11:07 +0000 | [diff] [blame] | 20 | |
| 21 | |
| 22 | #include <stdint.h> |
| 23 | |
| 24 | #ifndef SIZE_MAX |
| 25 | #error SIZE_MAX should be defined in C++ |
| 26 | #endif |