ast: fixed hang when checking bin-prot
This commit is contained in:
parent
486a3192c0
commit
2ed3b40937
|
@ -447,6 +447,9 @@ static void compileTerm(Token *& tok, std::stack<Token*> &op)
|
|||
} else if (!Token::Match(tok->next(), "(|[") && !templatefunc) {
|
||||
op.push(tok);
|
||||
tok = tok->next();
|
||||
} else if (Token::Match(tok, "%type% ( {")) {
|
||||
op.push(tok);
|
||||
tok = tok->linkAt(2);
|
||||
} else {
|
||||
Token *name = tok;
|
||||
Token *par = templatefunc ? tok->linkAt(1)->next() : tok->next();
|
||||
|
|
|
@ -10157,6 +10157,9 @@ private:
|
|||
// ({..})
|
||||
ASSERT_EQUALS("a{+d+ bc+", testAst("a+({b+c;})+d"));
|
||||
ASSERT_EQUALS("a{d*+ bc+", testAst("a+({b+c;})*d"));
|
||||
ASSERT_EQUALS("xa(= bc( yd(= ef(", testAst("x=(int)(a({b(c);}));"
|
||||
"y=(int)(d({e(f);}));"));
|
||||
|
||||
}
|
||||
|
||||
void astbrackets() const { // []
|
||||
|
|
Loading…
Reference in New Issue