33 lines · cpp
1// RUN: %clang_cc1 -triple x86_64-apple-macosx10.12.0 -fexceptions -std=c++17 -verify %s \2// RUN: -DEXPECT_DEFINED3//4// RUN: %clang_cc1 -triple x86_64-apple-macosx10.12.0 -fexceptions -std=c++17 -verify %s \5// RUN: -faligned-alloc-unavailable6//7// RUN: %clang_cc1 -triple x86_64-apple-macosx10.12.0 -fexceptions -std=c++17 -verify %s \8// RUN: -faligned-allocation -faligned-alloc-unavailable9//10// RUN: %clang_cc1 -triple s390x-none-zos -fexceptions -std=c++17 -verify %s \11// RUN: -DEXPECT_DEFINED12//13// RUN: %clang_cc1 -triple s390x-none-zos -fexceptions -std=c++17 -verify %s \14// RUN: -faligned-alloc-unavailable15//16// RUN: %clang_cc1 -triple s390x-none-zos -fexceptions -std=c++17 -verify %s \17// RUN: -faligned-allocation -faligned-alloc-unavailable18 19// Test that __cpp_aligned_new is not defined when CC1 is passed20// -faligned-alloc-unavailable by the Darwin and the z/OS driver, even when21// aligned allocation is actually enabled.22 23// expected-no-diagnostics24#ifdef EXPECT_DEFINED25# ifndef __cpp_aligned_new26# error "__cpp_aligned_new" should be defined27# endif28#else29# ifdef __cpp_aligned_new30# error "__cpp_aligned_new" should not be defined31# endif32#endif33