[PATCH] D73052: [clang-tidy] RenamerClangTidy now renames dependent member expr when the member can be resolved
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 20 08:52:27 PST 2020
njames93 created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
njames93 retitled this revision from "First Draft" to "[clang-tidy] RenamerClangTidy now renames dependent member expr when the member can be resolved".
njames93 added reviewers: aaron.ballman, JonasToth, logan-5.
Herald added a subscriber: xazax.hun.
njames93 edited the summary of this revision.
take this code
template<typename T>
class A{
int value;
A& operator=(const A& Other){
value = Other.value;
this->value = Other.value;
return *this;
}
};
Any explicit access to value is handled by the AST as a CXXDependentScopeMemberExpr. However we have enough information to be able to resolve that the explicit access is refering to `int value;`. The old behaviour of the RenamerClangTidy logic would be to ignore this access, This patch addresses this shortfall
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73052
Files:
clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming-member-decl-usage.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73052.239147.patch
Type: text/x-patch
Size: 5480 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200120/adc525b2/attachment.bin>
More information about the cfe-commits
mailing list