diff --git a/lib/ClangImporter/ClangImporter.cpp b/lib/ClangImporter/ClangImporter.cpp index 9e523e44c847a..5d1578239b708 100644 --- a/lib/ClangImporter/ClangImporter.cpp +++ b/lib/ClangImporter/ClangImporter.cpp @@ -1255,6 +1255,9 @@ ClangImporter::create(ASTContext &ctx, // read them later. instance.getLangOpts().NeededByPCHOrCompilationUsesPCH = true; + // Clang implicitly enables this by default in C++20 mode. + instance.getLangOpts().ModulesLocalVisibility = false; + if (importerOpts.Mode == ClangImporterOptions::Modes::PrecompiledModule) return importer; diff --git a/test/Interop/Cxx/concepts/method-requires.swift b/test/Interop/Cxx/concepts/method-requires.swift index 3f31960c60a09..7640976ee1642 100644 --- a/test/Interop/Cxx/concepts/method-requires.swift +++ b/test/Interop/Cxx/concepts/method-requires.swift @@ -1,6 +1,6 @@ // RUN: %target-swiftxx-frontend -emit-ir -Xcc -std=gnu++20 -I %S/Inputs %s | %FileCheck %s // -// REQUIRES: OS=macosx +// REQUIRES: OS=macosx || OS=linux-gnu import MethodRequires diff --git a/test/Interop/Cxx/stdlib/use-std-vector.swift b/test/Interop/Cxx/stdlib/use-std-vector.swift index 009afe8c41909..347c6f335feac 100644 --- a/test/Interop/Cxx/stdlib/use-std-vector.swift +++ b/test/Interop/Cxx/stdlib/use-std-vector.swift @@ -1,5 +1,5 @@ // RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -enable-experimental-cxx-interop) -// FIXME: also test this in C++20 mode once rdar://108810356 is fixed. +// RUN: %target-run-simple-swift(-I %S/Inputs -Xfrontend -enable-experimental-cxx-interop -Xcc -std=gnu++20) // // REQUIRES: executable_test //