Merge pull request #70602 from ApolloZhu/macro/expression-as-default-argument

[Macros] Expression macro as caller-side default argument
This commit is contained in:
Doug Gregor
2024-02-14 16:10:11 -08:00
committed by GitHub
51 changed files with 730 additions and 25 deletions

View File

@@ -1781,6 +1781,11 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
StringRef explicitSwiftModuleMap = searchPathOpts.ExplicitSwiftModuleMap;
genericSubInvocation.getSearchPathOptions().ExplicitSwiftModuleMap =
explicitSwiftModuleMap.str();
// Load plugin libraries for macro expression as default arguments
genericSubInvocation.getSearchPathOptions().PluginSearchOpts =
searchPathOpts.PluginSearchOpts;
auto &subClangImporterOpts = genericSubInvocation.getClangImporterOptions();
// Respect the detailed-record preprocessor setting of the parent context.
// This, and the "raw" clang module format it implicitly enables, are