[PATCH] D68539: [clang-tidy] fix for readability-identifier-naming incorrectly fixes variables which become keywords
Eugene Zelenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 5 06:35:49 PDT 2019
Eugene.Zelenko added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:865
+ auto &Idents = Decl->getASTContext().Idents;
+ auto CheckNewIdentifier = Idents.find(Fixup);
----------------
Please don't use auto when type is not spelled in same statement or not iterator.
================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h:68
+ enum class ShouldFixStatus {
+ ShouldFix = 0,
+ InsideMacro, /// if the identifier was used or declared within a macro we
----------------
Does value really matter?
================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h:99
- NamingCheckFailure() : ShouldFix(true) {}
+ NamingCheckFailure() : FixStatus(ShouldFixStatus::ShouldFix) {}
};
----------------
Please use default member initialization and = default;
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68539/new/
https://reviews.llvm.org/D68539
More information about the cfe-commits
mailing list