================ @@ -105,12 +117,26 @@ void NamedParameterCheck::check(const MatchFinder::MatchResult &Result) { NewName = Name; } - // Now insert the comment. Note that getLocation() points to the place + // Now insert the fix. Note that getLocation() points to the place // where the name would be, this allows us to also get complex cases like // function pointers right. const ParmVarDecl *Parm = P.first->getParamDecl(P.second); - D << FixItHint::CreateInsertion(Parm->getLocation(), - " /*" + NewName.str() + "*/"); + + // The fix depends on the InsertPlainNamesInForwardDecls option, + // whether this is a forward declaration and whether the parameter has + // a real name. + bool IsForwardDeclaration = (!Definition || Function != Definition); ---------------- EugeneZelenko wrote:
Should be `const`. https://github.com/llvm/llvm-project/pull/147953 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits