mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +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
18 lines
738 B
Swift
18 lines
738 B
Swift
// RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -enable-experimental-cxx-interop)
|
|
|
|
// REQUIRES: OS=windows-msvc
|
|
// REQUIRES: executable_test
|
|
|
|
import MsvcUseVecIt
|
|
|
|
// CHECK: call void @"?begin@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QEBA?AV?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@std@@@std@@@2@XZ"(ptr {{.*}}, ptr noalias nocapture sret
|
|
|
|
func test() -> Bool {
|
|
let result = f()
|
|
let begin = result.pointee.providers.__beginUnsafe()
|
|
let end = result.pointee.providers.__endUnsafe()
|
|
return begin != end
|
|
}
|
|
|
|
let _ = test()
|