File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -89,14 +89,10 @@ void UseUsingCheck::check(const MatchFinder::MatchResult &Result) {
8989 << FixItHint::CreateRemoval (RemovalRange);
9090
9191 SmallString<128 > Scratch;
92- if (Lexer::getSpelling (MatchedDecl.getBeginLoc (), Scratch, SM, LO) ==
93- " typedef" )
94- Diag << FixItHint::CreateRemoval (MatchedDecl.getBeginLoc ());
95-
96- Scratch.resize (0 );
97- if (Lexer::getSpelling (TokenBeforeName.getLocation (), Scratch, SM, LO) ==
98- " typedef" )
99- Diag << FixItHint::CreateRemoval (TokenBeforeName.getLocation ());
92+ for (const SourceLocation Loc :
93+ {MatchedDecl.getBeginLoc (), TokenBeforeName.getLocation ()})
94+ if (Lexer::getSpelling (Loc, Scratch, SM, LO) == " typedef" )
95+ Diag << FixItHint::CreateRemoval (Loc);
10096
10197 FirstTypedefName = MatchedDecl.getName ();
10298 } else {
You can’t perform that action at this time.
0 commit comments