================ @@ -10416,6 +10447,15 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, // Finally, we know we have the right number of parameters, install them. NewFD->setParams(Params); + // If this declarator is a declaration and not a definition, its parameters + // will not be pushed onto a scope chain. That means we will not issue any + // reserved identifier warnings for the declaration, but we will for the + // definition. Handle those here. + if (!Params.empty() && !D.isFunctionDefinition()) { ---------------- erichkeane wrote:
I suspect THIS is where your slowdown is going to come from, and I see no tests for this (that is, function parameters). ALSO, `!Params.empty()` isnt' really necessary, the `for` loop will do that for you. https://github.com/llvm/llvm-project/pull/137234 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits