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) {
89
89
<< FixItHint::CreateRemoval (RemovalRange);
90
90
91
91
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);
100
96
101
97
FirstTypedefName = MatchedDecl.getName ();
102
98
} else {
You can’t perform that action at this time.
0 commit comments