File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -88,12 +88,14 @@ void UseUsingCheck::check(const MatchFinder::MatchResult &Result) {
8888 (" using " + MatchedDecl.getName () + " =" ).str ())
8989 << FixItHint::CreateRemoval (RemovalRange);
9090
91- Token FirstToken;
92- Lexer::getRawToken (MatchedDecl.getBeginLoc (), FirstToken, SM, LO);
93- if (FirstToken.getRawIdentifier () == " typedef" )
94- Diag << FixItHint::CreateRemoval (FirstToken.getLocation ());
95-
96- if (TokenBeforeName.getRawIdentifier () == " typedef" )
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" )
9799 Diag << FixItHint::CreateRemoval (TokenBeforeName.getLocation ());
98100
99101 FirstTypedefName = MatchedDecl.getName ();
You can’t perform that action at this time.
0 commit comments