diff --git a/lib/ClangImporter/ClangImporter.cpp b/lib/ClangImporter/ClangImporter.cpp index d1a47bb2223c3..2fc11f9ee342a 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 0981f8dee24dd..896746b22e6a5 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 //