[clang-tidy] Fix regression in RenamerClangTidy
See bug https://bugs.llvm.org/show_bug.cgi\?id\=46976
This commit is contained in:
parent
8f576a7566
commit
7c4782ce91
@ -157,6 +157,9 @@ void RenamerClangTidyCheck::addUsage(
|
||||
RenamerClangTidyCheck::NamingCheckFailure &Failure =
|
||||
NamingCheckFailures[Decl];
|
||||
|
||||
if (!Failure.RawUsageLocs.insert(FixLocation.getRawEncoding()).second)
|
||||
return;
|
||||
|
||||
if (!Failure.ShouldFix())
|
||||
return;
|
||||
|
||||
@ -165,8 +168,6 @@ void RenamerClangTidyCheck::addUsage(
|
||||
|
||||
if (!utils::rangeCanBeFixed(Range, SourceMgr))
|
||||
Failure.FixStatus = RenamerClangTidyCheck::ShouldFixStatus::InsideMacro;
|
||||
|
||||
Failure.RawUsageLocs.insert(FixLocation.getRawEncoding());
|
||||
}
|
||||
|
||||
void RenamerClangTidyCheck::addUsage(const NamedDecl *Decl, SourceRange Range,
|
||||
|
@ -578,3 +578,8 @@ void Foo() {
|
||||
#undef M1
|
||||
#undef DUP
|
||||
} // namespace scratchspace
|
||||
|
||||
template<typename type_t>
|
||||
auto GetRes(type_t& Param) -> decltype(Param.res());
|
||||
// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: invalid case style for parameter 'Param'
|
||||
// CHECK-FIXES: auto GetRes(type_t& a_param) -> decltype(a_param.res());
|
||||
|
Loading…
x
Reference in New Issue
Block a user