[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] New Codan checker + questions about ASTRewrite

Hello,

2011/8/18 Mathias De Marà <mathias.demare+cdt@xxxxxxxxx>
Hello,

On Tue, Aug 16, 2011 at 11:20 PM, Sergey Prigogin <eclipse.sprigogin@xxxxxxxxx> wrote:
I'm going to adress the second question. You don't really need ASTRewrite for deleting preprocessor statements. All you need is to get locations of the statements within the file and create the corresponding DeleteEdits. Although preprocessor statements and are represented in AST, they are pretty independent from the rest of the AST. The complexity of ASTRewrite is an overkill for #ifdef and #endif statements.

-sergey

Okay, I guess I can do that, I'll change my fix.
I do have to say that I find it a bit strange that it's apparently not a good idea to use the especially created ASTRewrite. It feels a bit like doing duplicated work. Or am I wrong in this?

since I actually needed to remove multiple statements, it seemed like the 'cleanest' solution to use ASTRewrite (as explained below) in the end.
I've finished my changes, and selected the review options for my patch, but I haven't gotten any response so far.

Is this plugin good to go? Or do I need to add a few changes still?
It's BugÂ354087.

Greetings,
Mathias