This new flag enables `__has_feature(cxx_unstable)` that would replace libc++ macros for individual unstable/experimental features, e.g. `_LIBCPP_HAS_NO_INCOMPLETE_RANGES` or `_LIBCPP_HAS_NO_INCOMPLETE_FORMAT`. This would make it easier and more convenient to opt-in into all libc++ unstable features at once. Differential Revision: https://reviews.llvm.org/D120160
11 lines
353 B
C++
11 lines
353 B
C++
// RUN: %clang_cc1 -funstable -E %s -o - | FileCheck --check-prefix=CHECK-UNSTABLE %s
|
|
// RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-UNSTABLE %s
|
|
|
|
#if __has_feature(cxx_unstable)
|
|
int has_cxx_unstable();
|
|
#else
|
|
int has_no_cxx_unstable();
|
|
#endif
|
|
// CHECK-UNSTABLE: int has_cxx_unstable();
|
|
// CHECK-NO-UNSTABLE: int has_no_cxx_unstable();
|