Uninitialized variables: Cleanup '+=' handling. This is simplified in the Tokenizer now.

This commit is contained in:
Daniel Marjamäki 2010-11-16 20:09:23 +01:00
parent 35c72db251
commit eb54be2b2a
1 changed files with 0 additions and 20 deletions

View File

@ -537,26 +537,6 @@ private:
return &tok;
}
// += etc
if (Token::Match(tok.previous(), "[;{}]") || Token::Match(tok.tokAt(-2), "[;{}] *"))
{
// goto the equal..
const Token *eq = tok.next();
if (eq && eq->str() == "[" && eq->link() && eq->link()->next())
eq = eq->link()->next();
// is it X=
if (Token::Match(eq, "+=|-=|*=|/=|&=|^=") || eq->str() == "|=")
{
if (tok.previous()->str() == "*")
use_pointer(checks, &tok);
else if (tok.next()->str() == "[")
use_array(checks, &tok);
else
use(checks, &tok);
}
}
if (Token::Match(tok.next(), "= malloc|kmalloc") || Token::simpleMatch(tok.next(), "= new char ["))
{
alloc_pointer(checks, tok.varId());