Tokenizer: Upon createLinks error, report error and bailout

This commit is contained in:
Daniel Marjamäki 2011-01-23 09:38:38 +01:00
parent b10f0aabd6
commit 586cbd5839
1 changed files with 6 additions and 1 deletions

View File

@ -2412,7 +2412,12 @@ bool Tokenizer::tokenize(std::istream &code,
// TODO: Remove this "createLinks". Make sure that the testcase
// TestSimplifyTokens::simplifyTypedefFunction8
// doesn't fail.
createLinks();
if (!createLinks())
{
// Source has syntax errors, can't proceed
cppcheckError(0);
return false;
}
// enum..
simplifyEnum();