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
23 lines
487 B
Swift
23 lines
487 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: split-file %s %t
|
|
// RUN: %target-swift-frontend %t/test.swift -c -enable-experimental-cxx-interop -Xcc -fmodules-cache-path=%t/cache -I %t/Inputs
|
|
// RUN: find %t/cache | %FileCheck %s
|
|
|
|
// REQUIRES: OS=macosx || OS=linux-gnu
|
|
|
|
//--- Inputs/module.modulemap
|
|
module CxxModule {
|
|
header "header.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
//--- Inputs/header.h
|
|
|
|
#include <string_view>
|
|
|
|
//--- test.swift
|
|
|
|
import CxxModule
|
|
|
|
// CHECK: {{std|std_string_view}}-{{.*}}.pcm
|