| 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 |
// REQUIRES: stdlib=apple-libc++ |
| 10 |
|
| 11 |
// Test that using -pedantic-errors doesn't turn off availability annotations. |
| 12 |
// This used to be the case because we used __has_extension(...) to enable the |
| 13 |
// availability annotations, and -pedantic-errors changes the behavior of |
| 14 |
// __has_extension(...) in an incompatible way. |
| 15 |
|
| 16 |
// ADDITIONAL_COMPILE_FLAGS: -pedantic-errors |
| 17 |
|
| 18 |
#include <__config> |
| 19 |
|
| 20 |
#if !_LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS |
| 21 |
# error Availability annotations should be enabled on Apple platforms in the system configuration! |
| 22 |
#endif |