1 | // RUN: %clang_cc1 -triple x86_64-apple-macosx10.12.0 -fexceptions -std=c++17 -verify %s \ |
2 | // RUN: -DEXPECT_DEFINED |
3 | // |
4 | // RUN: %clang_cc1 -triple x86_64-apple-macosx10.12.0 -fexceptions -std=c++17 -verify %s \ |
5 | // RUN: -faligned-alloc-unavailable |
6 | // |
7 | // RUN: %clang_cc1 -triple x86_64-apple-macosx10.12.0 -fexceptions -std=c++17 -verify %s \ |
8 | // RUN: -faligned-allocation -faligned-alloc-unavailable |
9 | |
10 | // Test that __cpp_aligned_new is not defined when CC1 is passed |
11 | // -faligned-alloc-unavailable by the Darwin driver, even when aligned |
12 | // allocation is actually enabled. |
13 | |
14 | // expected-no-diagnostics |
15 | #ifdef EXPECT_DEFINED |
16 | # ifndef __cpp_aligned_new |
17 | # error "__cpp_aligned_new" should be defined |
18 | # endif |
19 | #else |
20 | # ifdef __cpp_aligned_new |
21 | # error "__cpp_aligned_new" should not be defined |
22 | # endif |
23 | #endif |
24 | |