[PATCH] D72121: [clang-tidy] Fix readability-identifier-naming missing member variables
Jonas Toth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 3 05:14:34 PST 2020
JonasToth added a comment.
Thank you for fixing these bugs!
Did you try running the check of clang/llvm again, to see if there are still missing cases of this?
================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:575
- if (Decl->isFileVarDecl() && Type.getTypePtr()->isAnyPointerType() && NamingStyles[SK_GlobalPointer])
+ if (Decl->isFileVarDecl() && Type.getTypePtr()->isAnyPointerType() &&
+ NamingStyles[SK_GlobalPointer])
----------------
these all seem to be an artifact of running clang-format?
Such a change can be done, but should happen in a separate patch (just formatting does not require review).
================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:742
continue;
- if (const auto *FD = Init->getAnyMember())
+ if (const auto *FD = Init->getAnyMember()) {
addUsage(NamingCheckFailures, FD,
----------------
this change violates the coding guideline.
================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:828
+ if (const auto MemberRef = Result.Nodes.getNodeAs<MemberExpr>("memberExpr")) {
+ SourceRange Range = MemberRef->getMemberNameInfo().getSourceRange();
----------------
`const auto *` to show that this variable is a pointer.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming-member-decl-usage.cpp:88
+
+ // bug report has Stack swapped to stack, this is stack swapped to Stack
+ // probably not going to cause any issue its just how
----------------
I dont understand this comment. What do you mean?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72121/new/
https://reviews.llvm.org/D72121
More information about the cfe-commits
mailing list