diff options
Diffstat (limited to 'src/shared/cplusplus/CheckStatement.cpp')
-rw-r--r-- | src/shared/cplusplus/CheckStatement.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/shared/cplusplus/CheckStatement.cpp b/src/shared/cplusplus/CheckStatement.cpp index 093ed91605..c476b2195d 100644 --- a/src/shared/cplusplus/CheckStatement.cpp +++ b/src/shared/cplusplus/CheckStatement.cpp @@ -153,12 +153,10 @@ bool CheckStatement::visit(ExpressionOrDeclarationStatementAST *ast) { // translationUnit()->warning(ast->firstToken(), // "ambiguous expression or declaration statement"); - if (ast->declaration) { - semantic()->check(ast->declaration, _scope); - _exprType = FullySpecifiedType(); - } else { - _exprType = semantic()->check(ast->expression, _scope); - } + + semantic()->check(ast->declaration, _scope); + _exprType = semantic()->check(ast->expression, _scope); + return false; } |