| Re: [cdt-dev] New Codan checker + questions about ASTRewrite |
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?