[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cdt-dev] New Codan checker + questions about ASTRewrite
- From: Mathias De MarÃ <mathias.demare+cdt@xxxxxxxxx>
- Date: Thu, 15 Sep 2011 23:11:57 +0200
- Delivered-to: firstname.lastname@example.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=gnLB6L7xiADUPxWKTtUhLF4nQoqhE+fWkcpLJ02QN7o=; b=wFeeRMgGaLd1azp8HickyCt80zcfF9q57/iszd2B6tmQwp0PQRfmf/VMqzZnc+r7RI opWjN6mR+CIu1xrgeL5sjx1ozhIOQ0vf75A1CMJs/Us13tUP03SWpXFyIpSxEJ1YDMSM 83rpZHMruL4SQqlanmYLLfa6letv7gD20OG60=
2011/8/18 Mathias De MarÃ <mathias.demare+cdt@xxxxxxxxx>
On Tue, Aug 16, 2011 at 11:20 PM, Sergey Prigogin <eclipse.sprigogin@xxxxxxxxx>
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.
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?