tokenizer : using the simplifyKnownVariables
This commit is contained in:
parent
612d0e56f2
commit
69137597f5
25
tokenize.cpp
25
tokenize.cpp
|
@ -1013,20 +1013,15 @@ void Tokenizer::simplifyTokenList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool modified = true;
|
||||||
bool done = false;
|
while ( modified )
|
||||||
while ( ! done )
|
|
||||||
{
|
{
|
||||||
done = true;
|
modified = false;
|
||||||
if( simplifyConditions() )
|
modified |= simplifyConditions();
|
||||||
done = false;
|
modified |= simplifyCasts();
|
||||||
|
modified |= simplifyFunctionReturn();
|
||||||
if( simplifyCasts() )
|
modified |= simplifyKnownVariables();
|
||||||
done = false;
|
}
|
||||||
|
|
||||||
if( simplifyFunctionReturn() )
|
|
||||||
done = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -1179,10 +1174,6 @@ bool Tokenizer::simplifyFunctionReturn()
|
||||||
|
|
||||||
bool Tokenizer::simplifyKnownVariables()
|
bool Tokenizer::simplifyKnownVariables()
|
||||||
{
|
{
|
||||||
// TODO, this function should be called from simplifyTokenList()
|
|
||||||
// after the implementation is done.
|
|
||||||
// TODO, this functions needs to be implemented.
|
|
||||||
// TODO, test
|
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
for ( TOKEN *tok = _tokens; tok; tok = tok->next() )
|
for ( TOKEN *tok = _tokens; tok; tok = tok->next() )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue