| 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | // test <stdalign.h> |
| 10 | // |
| 11 | // Even though <stdalign.h> is not provided by libc++, |
| 12 | // we still test that using it with libc++ on the search path will work. |
| 13 | |
| 14 | // TODO: GCC doesn't provide a proper <stdalign.h> for C++ until 15. |
| 15 | // UNSUPPORTED: gcc |
| 16 | |
| 17 | #include <stdalign.h> |
| 18 | |
| 19 | #ifndef __alignas_is_defined |
| 20 | # error __alignas_is_defined not defined |
| 21 | #endif |
| 22 | |
| 23 | #ifndef __alignof_is_defined |
| 24 | # error __alignof_is_defined not defined |
| 25 | #endif |
| 26 | |
| 27 | #ifdef alignas |
| 28 | # error alignas should not be defined |
| 29 | #endif |
| 30 | |
| 31 | #ifdef alignof |
| 32 | # error alignof should not be defined |
| 33 | #endif |
| 34 | |