mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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
12 lines
776 B
Swift
12 lines
776 B
Swift
// 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
|
|
|
|
// CHECK: error: type 'int' cannot be used prior to '::' because it has no members
|
|
// CHECK: {{note: in instantiation of template class 'GetTypeValue<int>' requested here|note: in instantiation of static data member 'GetTypeValue<int>::value' requested here}}
|