[PATCH] D150187: [tidy][IdentifierNaming] Fix crashes on non-identifiers
Viktoriia Bakalova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 9 04:05:16 PDT 2023
VitaNuo added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp:457
+ // Don't keep track for non-identifier names.
+ if (auto *II = Decl->getIdentifier()) {
+ return addUsage(RenamerClangTidyCheck::NamingCheckId(Decl->getLocation(),
----------------
PiotrZSL wrote:
> Most probably this could be done before for, as overridden/cannonical decl should have same naming.
> And looks we get here from VisitMemberExpr.
Could you do an early return instead? I believe it's clearer.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150187/new/
https://reviews.llvm.org/D150187
More information about the cfe-commits
mailing list