On Fri, Jul 13, 2012 at 6:58 PM, Manuel Klimek <[email protected]> wrote:

> On Fri, Jul 13, 2012 at 5:53 PM, Daniel Jasper <[email protected]> wrote:
> > New patch attached:
> > - More tests.
> > - Fixed line length.
> > - Better integer literal.
>
> Are you sure you want StringRef as class members here?
>

Oops. Sorry. Fixed.


>
> +    } else {
> +      // If we don't have the appropriate clause, then just delete
> the whole if.
> +      if (!PickTrueBranch)
> +        Replace.insert(replaceStmtWithText(*Result.SourceManager, *Node,
> ""));
> +    }
>
> I'd make that
> } else if (!PickTrueBranch) {
>   // If we want to use the 'else'-branch, but it doesn't exist, delete
> the whole 'if'.
>

Done.

+void run(const std::string &Code,
>
> I'd call that expectRewritten or something similar.
>

Done.

New patch attached.

Cheers,
Daniel


> Cheers,
> /Manuel
>
> >
> >
> > On Fri, Jul 13, 2012 at 5:07 PM, Daniel Jasper <[email protected]>
> wrote:
> >>
> >> :-D. Will change before submitting ...
> >>
> >>
> >> On Fri, Jul 13, 2012 at 4:34 PM, Jean-Daniel Dupas
> >> <[email protected]> wrote:
> >>>
> >>>
> >>> +//
> >>> +//  This will replace all integer literals with "2".
> >>> +//
> >>>
> >>> Isn't the universal answer 42 instead of 2 ? ;-)
> >>>
> >>> Le 13 juil. 2012 à 16:22, Daniel Jasper <[email protected]> a écrit :
> >>>
> >>> > With these callbacks, simple refactorings should be quite easy. It
> is a
> >>> > starting point and can be extended/improved in many ways.
> >>> >
> <refactoring-callbacks.patch>_______________________________________________
> >>> > cfe-commits mailing list
> >>> > [email protected]
> >>> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >>>
> >>> -- Jean-Daniel
> >>>
> >>>
> >>>
> >>>
> >>
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > [email protected]
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >
>

Attachment: refactoring-callbacks.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to