1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Bug 402006 - [formatter] Crashes on sizeof() macro

This commit is contained in:
Sergey Prigogin 2013-02-28 11:44:23 -08:00
parent 91de353168
commit 5cad4cd8be

View file

@ -2467,6 +2467,9 @@ public class CodeFormatterVisitor extends ASTVisitor implements ICPPASTVisitor,
}
private int visit(IASTTypeIdExpression node) {
if (enclosedInMacroExpansion(node)) {
return PROCESS_SKIP;
}
scribe.printNextToken(peekNextToken());
scribe.printNextToken(Token.tLPAREN);
node.getTypeId().accept(this);
@ -2598,6 +2601,9 @@ public class CodeFormatterVisitor extends ASTVisitor implements ICPPASTVisitor,
}
private int visit(IASTUnaryExpression node) {
if (enclosedInMacroExpansion(node)) {
return PROCESS_SKIP;
}
final IASTExpression operand= node.getOperand();
final int operator= node.getOperator();
switch (operator) {