Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Unable to replace of AmbiguityParent(CPPASTSimpleDeclaration)

Hello all,
     I have a refactoring tool that performs "replace" of nodes based on the type of nodes. 

For eg, a LiteralExpression is to be replaced with an IDExpression that I construct. And I just simply call the ((IASTAmbiguityParent)LiteralExpression.getParent()).replace(id) where id is the IDExpression that I have constructed.

Now when I try the same for replacing a SimpleDeclSpecifier (int) with a CPPASTNamedTypeSpecifier where the parent is a CPPASTSImpleDeclaration, somehow the replace doesnt work. I debugged it, there is no error, no exception. Just that the replace simply doesnt work. 

Back to the top