Community
Participate
Working Groups
Reproduce: 1) apply patch for ASTWriter from bug 321069 if it's not yet committed 2) apply patches for refactoring from bug 319111 and bug 319273 3) create a new C++ project and new class with class wizard' default settings, use this code: class vprob { public: int (*fp)(); int (*(*aFunction())[2]); }; 4) run 'generate getters and setters', generate both for fp 5) observe the following code being generated in the header: class vprob { public: int (*fp)(); int (*getFp() const)(); void setFp(int(*fp)()); int (*((*aFunction())[2]); // syntax error here }; --- ASTWriter generates correct code, but it gets malformed somehow in ChangeGenerator. Go to: org.eclipse.cdt.internal.core.dom.rewrite.changegenerator.ChangeGenerator.reformatSynthCode(IASTNode, String) Put a breakpoint on that method, reproduce the problem again and observe how the extra '(' is created. Some arcane magic is done there. This needs to be fixed or we'll have some more random unpredictable syntax errors after refactoring.