mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-21 21:52:10 +02:00
Bug 487990 - Fix format of variadic functions
Change-Id: I802d032f733247178db46c8fe43fdb9350555509
This commit is contained in:
parent
cfc3278454
commit
0f1940afc5
2 changed files with 14 additions and 1 deletions
|
@ -2605,7 +2605,9 @@ public class CodeFormatterVisitor extends ASTVisitor implements ICPPASTVisitor,
|
|||
}
|
||||
if (addEllipsis) {
|
||||
if (i > 0) {
|
||||
if (peekNextToken() == options.fSeparatorToken) {
|
||||
scribe.printNextToken(options.fSeparatorToken, options.fSpaceBeforeSeparator);
|
||||
}
|
||||
scribe.printTrailingComment();
|
||||
}
|
||||
scribe.alignFragment(alignment, i);
|
||||
|
|
|
@ -4814,4 +4814,15 @@ public class CodeFormatterTest extends BaseUITestCase {
|
|||
public void testNoexcept_Bug562723() throws Exception {
|
||||
assertFormatterResult();
|
||||
}
|
||||
|
||||
//void foo(int...) {}
|
||||
//int main() {}
|
||||
|
||||
//void foo(int ...) {
|
||||
//}
|
||||
//int main() {
|
||||
//}
|
||||
public void testVariadicFunction_Bug487990() throws Exception {
|
||||
assertFormatterResult();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue