mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 343479: Switch statement without compound statement.
This commit is contained in:
parent
d9a0d4ef7f
commit
3b867a0d26
1 changed files with 2 additions and 2 deletions
|
@ -1998,7 +1998,7 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
|
|||
if (LT(1) != IToken.tEOC)
|
||||
stmt= statement();
|
||||
|
||||
if (stmt instanceof IASTCaseStatement == false)
|
||||
if (!(stmt instanceof IASTCaseStatement) && !(stmt instanceof IASTDefaultStatement))
|
||||
return stmt;
|
||||
|
||||
// bug 105334, switch without compound statement
|
||||
|
@ -2006,7 +2006,7 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
|
|||
((ASTNode) comp).setOffsetAndLength((ASTNode) stmt);
|
||||
comp.addStatement(stmt);
|
||||
|
||||
while (LT(1) != IToken.tEOC && stmt instanceof IASTCaseStatement) {
|
||||
while (LT(1) != IToken.tEOC && (stmt instanceof IASTCaseStatement || stmt instanceof IASTDefaultStatement)) {
|
||||
stmt= statement();
|
||||
comp.addStatement(stmt);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue