AST: Fixed crash
This commit is contained in:
parent
85b41059c5
commit
bb746261d3
|
@ -599,7 +599,8 @@ static void compileComma(Token *&tok, std::stack<Token*> &op)
|
|||
|
||||
static void compileExpression(Token *&tok, std::stack<Token*> &op)
|
||||
{
|
||||
compileComma(tok,op);
|
||||
if (tok)
|
||||
compileComma(tok,op);
|
||||
}
|
||||
|
||||
void TokenList::createAst()
|
||||
|
|
|
@ -9966,6 +9966,7 @@ private:
|
|||
ASSERT_EQUALS("a\'\'=", testAst("a=\'\'"));
|
||||
testAst("char a[1]=\"\";"); // don't crash
|
||||
testAst("int f(char argv[]);"); // don't crash
|
||||
testAst("--"); // don't crash
|
||||
}
|
||||
|
||||
void astpar() const { // parentheses
|
||||
|
|
Loading…
Reference in New Issue