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) {
88
88
(" using " + MatchedDecl.getName () + " =" ).str ())
89
89
<< FixItHint::CreateRemoval (RemovalRange);
90
90
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" )
97
99
Diag << FixItHint::CreateRemoval (TokenBeforeName.getLocation ());
98
100
99
101
FirstTypedefName = MatchedDecl.getName ();
You can’t perform that action at this time.
0 commit comments