//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // UNSUPPORTED: no-threads // REQUIRES: c++03 || c++11 || c++14 || c++17 || c++20 // No diagnostic gets emitted when we build with modules. // XFAIL: clang-modules-build // This test ensures that we issue a reasonable diagnostic when including after // has been included. Before C++23, this otherwise leads to obscure errors // because may try to redefine things defined by . // Ignore additional weird errors that happen when the two headers are mixed. // ADDITIONAL_COMPILE_FLAGS: -Xclang -verify-ignore-unexpected=error -Xclang -verify-ignore-unexpected=warning #include #include // expected-error@*:* {{ is incompatible with before C++23.}}