mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[cxx-interop] Honor default expressions for unnamed arguments
We stumbled upon an old workaround that disabled the synthesis of Swift default expressions for C++ function parameters that don't have a name. This change removes the workaround. rdar://162310543
This commit is contained in:
@@ -2549,10 +2549,6 @@ SwiftDeclSynthesizer::makeDefaultArgument(const clang::ParmVarDecl *param,
|
||||
const swift::Type &swiftParamTy,
|
||||
SourceLoc paramLoc) {
|
||||
assert(param->hasDefaultArg() && "must have a C++ default argument");
|
||||
if (!param->getIdentifier())
|
||||
// Work around an assertion failure in CXXNameMangler::mangleUnqualifiedName
|
||||
// when mangling std::__fs::filesystem::path::format.
|
||||
return nullptr;
|
||||
|
||||
ASTContext &ctx = ImporterImpl.SwiftContext;
|
||||
clang::ASTContext &clangCtx = param->getASTContext();
|
||||
|
||||
Reference in New Issue
Block a user