Tokenizer::simplifyTypedef: 'tokAt(offset)=>tokOffset': begin conversion.
This commit is contained in:
parent
e530d770e1
commit
017f0090fa
|
@ -985,6 +985,7 @@ void Tokenizer::simplifyTypedef()
|
||||||
Token *funcStart = 0;
|
Token *funcStart = 0;
|
||||||
Token *funcEnd = 0;
|
Token *funcEnd = 0;
|
||||||
unsigned int offset = 1;
|
unsigned int offset = 1;
|
||||||
|
Token *tokOffset = tok->next();
|
||||||
bool function = false;
|
bool function = false;
|
||||||
bool functionPtr = false;
|
bool functionPtr = false;
|
||||||
bool functionRef = false;
|
bool functionRef = false;
|
||||||
|
@ -1003,14 +1004,15 @@ void Tokenizer::simplifyTypedef()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Token::simpleMatch(tok->next(), "::") ||
|
if (tok->next()->str() == "::" || Token::Match(tok->next(), "%type%")) {
|
||||||
Token::Match(tok->next(), "%type%")) {
|
|
||||||
typeStart = tok->next();
|
typeStart = tok->next();
|
||||||
offset = 1;
|
offset = 1;
|
||||||
|
|
||||||
while (Token::Match(tok->tokAt(offset), "const|signed|unsigned|struct|enum %type%") ||
|
while (Token::Match(tokOffset, "const|signed|unsigned|struct|enum %type%") ||
|
||||||
(tok->tokAt(offset + 1) && tok->tokAt(offset + 1)->isStandardType()))
|
(tokOffset->next() && tokOffset->next()->isStandardType())) {
|
||||||
++offset;
|
++offset;
|
||||||
|
tokOffset = tokOffset->next();
|
||||||
|
}
|
||||||
|
|
||||||
typeEnd = tok->tokAt(offset++);
|
typeEnd = tok->tokAt(offset++);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue