Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHansruedi Patzen2018-05-30 11:23:56 +0000
committerThomas Corbat2018-06-15 06:53:27 +0000
commita9988957f653cf75d24b12180658f266d6dd9f16 (patch)
tree79679954f7557fa8c12d8c2a9313980e0c272db4 /core/org.eclipse.cdt.core/src
parent3f98811f7326e0eb94c745489985183e4bec2d7a (diff)
downloadorg.eclipse.cdt-a9988957f653cf75d24b12180658f266d6dd9f16.tar.gz
org.eclipse.cdt-a9988957f653cf75d24b12180658f266d6dd9f16.tar.xz
org.eclipse.cdt-a9988957f653cf75d24b12180658f266d6dd9f16.zip
Bug 535331: Rewriting sizeof...() drops the parenthesis
Fix and test. Change-Id: If54f24d833724f3c51ae0b6e7f325493e5110719 Signed-off-by: Hansruedi Patzen <hansruedi.patzen@hsr.ch> Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
Diffstat (limited to 'core/org.eclipse.cdt.core/src')
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CodeFormatterVisitor.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CodeFormatterVisitor.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CodeFormatterVisitor.java
index f5947591368..a38417f8b11 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CodeFormatterVisitor.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/CodeFormatterVisitor.java
@@ -2669,9 +2669,7 @@ public class CodeFormatterVisitor extends ASTVisitor implements ICPPASTVisitor,
case IASTUnaryExpression.op_sizeofParameterPack:
scribe.printNextToken(Token.t_sizeof, scribe.printComment());
scribe.printNextToken(Token.tELIPSE, scribe.printComment());
- if (peekNextToken() != Token.tLPAREN) {
- scribe.space();
- }
+ scribe.printNextToken(Token.tLPAREN);
operand.accept(this);
break;
case IASTUnaryExpression.op_throw:

Back to the top