[PATCH] Extend the check to detect patterns like 'ptr.get() == nullptr'

Samuel Benzaquen sbenza at google.com
Mon Apr 7 14:39:26 PDT 2014


On Mon, Apr 7, 2014 at 4:22 PM, Manuel Klimek <klimek at google.com> wrote:

> On Apr 7, 2014 6:43 PM, "Samuel Benzaquen" <sbenza at google.com> wrote:
> >
> > On Mon, Apr 7, 2014 at 1:14 PM, Manuel Klimek <klimek at google.com> wrote:
> >>
> >> On Mon, Apr 7, 2014 at 6:29 PM, Samuel Benzaquen <sbenza at google.com>
> wrote:
> >>>
> >>>   Fixed the typo on shared_ptr and added a shared_ptr to the test.
> >>>
> >>>   Fixed the -fix.cpp test to actually check the output.
> >>>   FileCheck can match the CHECK: lines with themselves if you don't
> remove them from the input.
> >>
> >>
> >> Any reason not to use the same pattern in all tests (they get cargo
> culted a lot).
> >
> >
> > I am figuring out how FileCheck works as I go.
> > I have been also wondering why we don't have all these as scripts. imo,
> the test should have a single line at the top:
> >   // RUN: check_clang_tidy_fix.sh <check-name> %s %t %T
> > or something like that. Instead of copying the same N lines everywhere
> (and changing them slightly).
>
> I think that's a great idea... Go ahead :-)
>
Done.
Added one script for the command line output and one for the in-file fix.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140407/7bbbca37/attachment.html>


More information about the cfe-commits mailing list