diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/Scribe.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/Scribe.java index f8b38a00f31..e70cc0c9191 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/Scribe.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/Scribe.java @@ -771,11 +771,6 @@ public class Scribe { printComment(); currentPosition= scanner.getCurrentPosition(); } - if (pendingSpace) { - addInsertEdit(currentPosition, SPACE); - pendingSpace= false; - needSpace= false; - } if (startOffset + length < currentPosition) { return; // Don't move backwards } diff --git a/core/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp b/core/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp index 89ede2db0a6..674808249f7 100644 --- a/core/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp +++ b/core/org.eclipse.cdt.ui.tests/resources/formatter/sample/After.cpp @@ -24,13 +24,15 @@ const SimpleStruct simpleStruct = { 1, "mySimple", 0.1232 }; \ } -const SimpleStruct array[] = { { SIZEOF( simpleStruct, num ), +const SimpleStruct array[] = { { +SIZEOF( simpleStruct, num ), #if FOO "foo" # else "bar" #endif - , 0.5 }, { SIZEOF( simpleStruct, floatNum ), "name", 1.1 } }; + , 0.5 }, { +SIZEOF( simpleStruct, floatNum ), "name", 1.1 } }; // single line outside scope