1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-14 03:35:37 +02:00

Bug 241967: [formatter] Missing space in const parameter declaration

This commit is contained in:
Anton Leherbauer 2008-07-25 08:46:59 +00:00
parent ccecd21ea7
commit d548722c4e
2 changed files with 16 additions and 0 deletions

View file

@ -1338,6 +1338,9 @@ public class CodeFormatterVisitor extends CPPASTVisitor {
scribe.space(); scribe.space();
} }
} }
if (scribe.printModifiers()) {
scribe.space();
}
node.getName().accept(this); node.getName().accept(this);
return PROCESS_SKIP; return PROCESS_SKIP;
} }

View file

@ -792,4 +792,17 @@ public class CodeFormatterTest extends BaseUITestCase {
public void testNestedTemplatedArgument_Bug241058() throws Exception { public void testNestedTemplatedArgument_Bug241058() throws Exception {
assertFormatterResult(); assertFormatterResult();
} }
//#define TP_SMALLINT int32_t
//void foo(const TP_SMALLINT &intVal) { }
//void bar(const TP_SMALLINT intVal) { }
//#define TP_SMALLINT int32_t
//void foo(const TP_SMALLINT &intVal) {
//}
//void bar(const TP_SMALLINT intVal) {
//}
public void testPreserveSpaceInParameterDecl_Bug241967() throws Exception {
assertFormatterResult();
}
} }