[PATCH] Extend the check to detect patterns like 'ptr.get() == nullptr'
Manuel Klimek
klimek at google.com
Mon Apr 7 13:22:36 PDT 2014
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 :-)
>
>>
>>
>>>
>>>
>>> Hi djasper, klimek-test,
>>>
>>> http://reviews.llvm.org/D3294
>>>
>>> CHANGE SINCE LAST DIFF
>>> http://reviews.llvm.org/D3294?vs=8382&id=8411#toc
>>>
>>> Files:
>>> clang-tidy/misc/RedundantSmartptrGet.cpp
>>> test/clang-tidy/make_compile_commands_json.sh
>>> test/clang-tidy/redundant-smartptr-get-fix.cpp
>>> test/clang-tidy/redundant-smartptr-get.cpp
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140407/5b52d01f/attachment.html>
More information about the cfe-commits
mailing list