Skip to content
  • Nikolai Kosjar's avatar
    C++: Fix parsing of "Foo *foo = new Foo()" · 390b4f0e
    Nikolai Kosjar authored
    It should be parsed as an DeclarationStatement, but instead it was
    parsed as an ExpressionStatement.
    
    Regression introduced with
    
        commit d3c5fff6
    
    .
        C++: Fix expensive parsing of expressions
    
    The introduced ASTCache did not save the correct return value of a
    parse* function. Because of that, the first return in
    Parser::parseExpressionList returned false on the second invocation
    (cache hit), instead of true, which resulted in an ExpressionStatement.
    
    Task-number: QTCREATORBUG-13122
    Change-Id: I8dbd8852b0909edddcd3195b484f4cea92328cc5
    Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@digia.com>
    390b4f0e