File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -91,14 +91,6 @@ struct Chunk {
91
91
llvm::SmallVector<UnwrappedLine, 0 > Children;
92
92
};
93
93
94
- bool tokenMatches (const FormatToken *Left, const FormatToken *Right) {
95
- if (Left->getType () == Right->getType () &&
96
- Left->TokenText == Right->TokenText )
97
- return true ;
98
- llvm::dbgs () << Left->TokenText << " != " << Right->TokenText << " \n " ;
99
- return false ;
100
- }
101
-
102
94
// Allows to produce chunks of a token list by typing the code of equal tokens.
103
95
//
104
96
// Created from a list of tokens, users call "consume" to get the next chunk
@@ -110,7 +102,9 @@ struct Matcher {
110
102
Chunk consume (StringRef Tokens) {
111
103
TokenList Result;
112
104
for (const FormatToken *Token : uneof (Lex.lex (Tokens))) {
113
- assert (tokenMatches (*It, Token));
105
+ (void )Token; // Fix unused variable warning when asserts are disabled.
106
+ assert ((*It)->getType () == Token->getType () &&
107
+ (*It)->TokenText == Token->TokenText );
114
108
Result.push_back (*It);
115
109
++It;
116
110
}
You can’t perform that action at this time.
0 commit comments