1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 301366 - [formatter] throw; invalidates indenting rules

This commit is contained in:
Anton Leherbauer 2010-02-09 11:06:58 +00:00
parent c107c6f6c3
commit 5cf3cf47c2

View file

@ -2057,10 +2057,12 @@ public class CodeFormatterVisitor extends CPPASTVisitor {
break;
case IASTUnaryExpression.op_throw:
scribe.printNextToken(Token.t_throw, scribe.printComment());
if (peekNextToken() != Token.tLPAREN) {
scribe.space();
if (operand != null) {
if (peekNextToken() != Token.tLPAREN) {
scribe.space();
}
operand.accept(this);
}
operand.accept(this);
break;
case IASTUnaryExpression.op_typeid:
scribe.printNextToken(Token.t_typeid, scribe.printComment());