summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/Parser.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2010-02-02 12:09:32 +0100
committerErik Verbruggen <erik.verbruggen@nokia.com>2010-02-02 12:34:57 +0100
commita76293b5ffd3d9c99465b2b61ccf0e664b5ccd02 (patch)
tree0f518fccb4fd8ae48c121a9fa6e0d91821e522d3 /src/shared/cplusplus/Parser.cpp
parentc33b55537dd7c5b641e061253123b3bc75b4b3bf (diff)
downloadqt-creator-a76293b5ffd3d9c99465b2b61ccf0e664b5ccd02.tar.gz
Fixed unintended switch-fall-through.
For @synchornized when ObjC is disabled.
Diffstat (limited to 'src/shared/cplusplus/Parser.cpp')
-rw-r--r--src/shared/cplusplus/Parser.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/shared/cplusplus/Parser.cpp b/src/shared/cplusplus/Parser.cpp
index 6c3290f4f1..904f1a3189 100644
--- a/src/shared/cplusplus/Parser.cpp
+++ b/src/shared/cplusplus/Parser.cpp
@@ -2392,8 +2392,7 @@ bool Parser::parseStatement(StatementAST *&node)
}
case T_AT_SYNCHRONIZED:
- if (objCEnabled())
- return parseObjCSynchronizedStatement(node);
+ return objCEnabled() && parseObjCSynchronizedStatement(node);
case T_Q_D:
case T_Q_Q: {
@@ -2411,7 +2410,6 @@ bool Parser::parseStatement(StatementAST *&node)
return parseExpressionOrDeclarationStatement(node);
} // switch
- return false;
}
bool Parser::parseBreakStatement(StatementAST *&node)
@@ -2746,6 +2744,10 @@ bool Parser::parseCompoundStatement(StatementAST *&node)
if (LA() == T_LBRACE) {
CompoundStatementAST *ast = new (_pool) CompoundStatementAST;
ast->lbrace_token = consumeToken();
+
+ // ### TODO: the GNU "local label" extension: "__label__ X, Y, Z;"
+ // These are only allowed at the start of a compound stmt regardless of the language.
+
StatementListAST **statement_ptr = &ast->statement_list;
while (int tk = LA()) {
if (tk == T_RBRACE)