forked from OSchip/llvm-project
![]() Summary: Previously if a type was accessed with a qualifier, RenamerClangTidy wouldn't rename the TypeLoc, this patch addresses this shortfall by trying to find the Unqualified TypeLoc first. Also fixed a broken test case that was dependent on this broken behaviour. Example: ``` struct a{}; void foo(const a&); void foo(a&); void foo(a); void foo(a&&); void foo(const a); ``` exec `-checks=readability-identifier-naming --config="{CheckOptions: [{key: readability-identifier-naming.StructCase, value: CamelCase}]}" -fix` Current Behaviour: ``` struct A{}; void foo(const a&); void foo(A&); void foo(A); void foo(A&&); void foo(const a); ``` Proposed new behaviour: ``` struct A{}; void foo(const A&); void foo(A&); void foo(A); void foo(A&&); void foo(const A); ``` Reviewers: aaron.ballman, gribozavr2, alexfh Reviewed By: aaron.ballman Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76549 |
||
---|---|---|
.. | ||
ASTUtils.cpp | ||
ASTUtils.h | ||
CMakeLists.txt | ||
DeclRefExprUtils.cpp | ||
DeclRefExprUtils.h | ||
ExceptionAnalyzer.cpp | ||
ExceptionAnalyzer.h | ||
ExprSequence.cpp | ||
ExprSequence.h | ||
FileExtensionsUtils.cpp | ||
FileExtensionsUtils.h | ||
FixItHintUtils.cpp | ||
FixItHintUtils.h | ||
HeaderGuard.cpp | ||
HeaderGuard.h | ||
IncludeInserter.cpp | ||
IncludeInserter.h | ||
IncludeSorter.cpp | ||
IncludeSorter.h | ||
LexerUtils.cpp | ||
LexerUtils.h | ||
Matchers.h | ||
NamespaceAliaser.cpp | ||
NamespaceAliaser.h | ||
OptionsUtils.cpp | ||
OptionsUtils.h | ||
RenamerClangTidyCheck.cpp | ||
RenamerClangTidyCheck.h | ||
TransformerClangTidyCheck.cpp | ||
TransformerClangTidyCheck.h | ||
TypeTraits.cpp | ||
TypeTraits.h | ||
UsingInserter.cpp | ||
UsingInserter.h |