================
@@ -5120,6 +5121,10 @@ bool Sema::addInstantiatedParametersToScope(
// Simple case: not a parameter pack.
assert(FParamIdx < Function->getNumParams());
ParmVarDecl *FunctionParam = Function->getParamDecl(FParamIdx);
+ DeclarationName name = FunctionParam->getDeclName();
+ auto _ = llvm::make_scope_exit([&]() {
+ FunctionParam->setDeclName(name);
----------------
zyn0217 wrote:
> I notice we have a `FunctionParam->setDeclName(PatternParam->getDeclName());`
> not far below this point. Do we also need to apply a fix there?
No? Unless we allowed default arguments on parameter packs
https://github.com/llvm/llvm-project/pull/142338
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits