When an inline builtin declaration is shadowed by an actual declaration, we must
reference the actual declaration, even if it's not the last, following GCC
behavior.
This fixes #54715
Differential D123308
[Clang][Fortify] drop inline decls when redeclared serge-sans-paille on Apr 7 2022, 6:27 AM. Authored by
Details When an inline builtin declaration is shadowed by an actual declaration, we must This fixes #54715
Diff Detail
Event TimelineComment Actions Thanks for the quick fix!
Comment Actions Also, for the initial lines of commit messages, please try to make them less ambiguous about which parts of the project they touch. For example [Clang][Fortify] drop inline decls when redeclared is more descriptive should this get bucketed with other commits in a buildbot failure. The oneline helps triagers quickly ascertain whether failures they observe look related to which change or not. |
If OnlyHasInlineBuiltinDeclaration returning false is unusual, can we get away with switching the order of the checks here, so that CGF.CurFn->getName() != FDInlineName which might be more likely might short circuit the conditional? That might help us avoid walking the redecl list in OnlyHasInlineBuiltinDeclaration occasionally.