mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 20:35:38 +02:00
Bug 269590 - Format error for global const typename
This commit is contained in:
parent
80ddff81ed
commit
2c3979ce37
2 changed files with 13 additions and 3 deletions
|
@ -1352,15 +1352,15 @@ public class CodeFormatterVisitor extends CPPASTVisitor {
|
|||
}
|
||||
|
||||
private int visit(IASTNamedTypeSpecifier node) {
|
||||
if (scribe.printModifiers()) {
|
||||
scribe.space();
|
||||
}
|
||||
if (node instanceof ICPPASTNamedTypeSpecifier) {
|
||||
if (((ICPPASTNamedTypeSpecifier)node).isTypename()) {
|
||||
scribe.printNextToken(Token.t_typename);
|
||||
scribe.space();
|
||||
}
|
||||
}
|
||||
if (scribe.printModifiers()) {
|
||||
scribe.space();
|
||||
}
|
||||
node.getName().accept(this);
|
||||
return PROCESS_SKIP;
|
||||
}
|
||||
|
|
|
@ -1157,4 +1157,14 @@ public class CodeFormatterTest extends BaseUITestCase {
|
|||
assertFormatterResult();
|
||||
}
|
||||
|
||||
//inline typename A foo();
|
||||
//void bar(const typename A x) ;
|
||||
//static typename A x ;
|
||||
|
||||
//inline typename A foo();
|
||||
//void bar(const typename A x);
|
||||
//static typename A x;
|
||||
public void testFormatterProblemsWithTypename_Bug269590() throws Exception {
|
||||
assertFormatterResult();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue