[cxx-interop] Use C++17 standard by default

Clang is using C++17 standard version by default since Clang 16.

Swift’s ClangImporter should do the same, to make sure that clients who run clang and then swiftc without explicit std version see consistent behavior.

rdar://125777068
This commit is contained in:
Egor Zhdan
2024-04-02 14:55:08 +01:00
parent d285e8a78c
commit 1be7230876
16 changed files with 22 additions and 15 deletions

View File

@@ -1,7 +1,8 @@
// RUN: %target-swift-ide-test -print-module -module-to-print=ConstexprStaticMemberVarErrors -I %S/Inputs -source-filename=x -enable-experimental-cxx-interop 2>&1 | %FileCheck %s
// RUN: %target-swift-ide-test -print-module -module-to-print=ConstexprStaticMemberVarErrors -I %S/Inputs -source-filename=x -enable-experimental-cxx-interop -Xcc -std=c++14 2>&1 | %FileCheck %s
// Check that we properly report the error and don't crash when importing an
// invalid decl.
// When using C++17, this C++ header doesn't trigger any Clang error. This is expected.
// Windows doesn't fail at all here which seems ok (and probably should be the case for other platforms too).
// XFAIL: OS=windows-msvc