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:
parent
91de353168
commit
5cad4cd8be
1 changed files with 6 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue