Revert "Fix potential uninitialized variable in Tokenizer::simplifyTypedef"

This reverts commit bed2f66302.
This commit is contained in:
Daniel Marjamäki 2016-10-29 18:29:05 +02:00
parent 7001aa1e81
commit 5b2e4891c4
1 changed files with 4 additions and 4 deletions

View File

@ -1448,13 +1448,13 @@ void Tokenizer::simplifyTypedef()
// Name is not available, and () should not be
// inserted
const bool castOperator = inOperator && Token::Match(tok2, "%type% (");
Token *openParenthesis = nullptr;
Token *tok3;
if (!castOperator) {
tok2->insertToken("(");
tok2 = tok2->next();
openParenthesis = tok2;
tok3 = tok2;
}
const Token *tok4 = namespaceStart;
@ -1470,14 +1470,14 @@ void Tokenizer::simplifyTypedef()
tok2->insertToken("*");
tok2 = tok2->next();
if (openParenthesis) {
if (!castOperator) {
// skip over name
tok2 = tok2->next();
tok2->insertToken(")");
tok2 = tok2->next();
Token::createMutualLinks(tok2, openParenthesis);
Token::createMutualLinks(tok2, tok3);
}
}
} else if (typeOf) {