[clang-tools-extra] r245471 - [clang-tidy] Fix a bug in UseNullptrCheck.

Pete Cooper via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 19 14:41:30 PDT 2015


> On Aug 19, 2015, at 2:38 PM, Alexander Kornienko <alexfh at google.com> wrote:
> 
> The check has been reverted in r245493. Sorry for the breakage, I was hoping that this commit fixes it.
No problem.  Thanks for taking a look.

If you think the rest of the code is good and want to land it again then thats fine.  You can leave out the check below until you are happy that its working too.  That way you potentially won’t be blocked for too long.

Thanks,
Pete
> 
> On Wed, Aug 19, 2015 at 10:31 PM, Pete Cooper <peter_cooper at apple.com <mailto:peter_cooper at apple.com>> wrote:
> Looks like its only a single test thats failing.
> 
> Would you mind if I remove this piece of the test until we can get to the bottom of it?
> 
> void test_macro_expansion4() {
> #define MY_NULL NULL
>   int *p = MY_NULL;
>   // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: use nullptr [modernize-use-nullptr]
>   // CHECK-FIXES: int *p = nullptr;
> #undef MY_NULL
> }
> 
> Thanks,
> Pete
>> On Aug 19, 2015, at 1:00 PM, Pete Cooper <peter_cooper at apple.com <mailto:peter_cooper at apple.com>> wrote:
>> 
>> Hi Alexander
>> 
>> We’re still getting a green dragon failure on the null ptr check test.  Mind taking a look?
>> 
>> http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/10351/consoleFull#50560140149ba4694-19c4-4d7e-bec5-911270d8a58c <https://urldefense.proofpoint.com/v2/url?u=http-3A__lab.llvm.org-3A8080_green_job_clang-2Dstage1-2Dconfigure-2DRA-5Fcheck_10351_consoleFull-2350560140149ba4694-2D19c4-2D4d7e-2Dbec5-2D911270d8a58c&d=BQMFaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=egkIy3ZyHViev_djzwydHEvkmBTxiHkYi7IViAItTvY&s=Jk2TDC-f1lko8XlDHLjnD9998CpHgKUoBidcEOk2xIc&e=>
>> 
>> Thanks
>> Pete
>>> On Aug 19, 2015, at 10:50 AM, Alexander Kornienko via cfe-commits <cfe-commits at lists.llvm.org <mailto:cfe-commits at lists.llvm.org>> wrote:
>>> 
>>> Author: alexfh
>>> Date: Wed Aug 19 12:50:22 2015
>>> New Revision: 245471
>>> 
>>> URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D245471-26view-3Drev&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=vEGzlOUc6IO5ny5JKNkJAUEoiokQ1N60GDcHk0yboKQ&s=wuoYp-wW8aBSkIHSX7igi7DHfur7JyIHWwnzHMTYdlg&e= <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D245471-26view-3Drev&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=vEGzlOUc6IO5ny5JKNkJAUEoiokQ1N60GDcHk0yboKQ&s=wuoYp-wW8aBSkIHSX7igi7DHfur7JyIHWwnzHMTYdlg&e=> 
>>> Log:
>>> [clang-tidy] Fix a bug in UseNullptrCheck.
>>> 
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D12162&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=vEGzlOUc6IO5ny5JKNkJAUEoiokQ1N60GDcHk0yboKQ&s=YiXUYCqfOl7durvaPOdifn3l7_G0FJhlE4A_q5Q6xwM&e= <https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D12162&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=vEGzlOUc6IO5ny5JKNkJAUEoiokQ1N60GDcHk0yboKQ&s=YiXUYCqfOl7durvaPOdifn3l7_G0FJhlE4A_q5Q6xwM&e=> 
>>> 
>>> Patch by Angel Garcia!
>>> 
>>> Modified:
>>>    clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp
>>> 
>>> Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp
>>> URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_clang-2Dtools-2Dextra_trunk_clang-2Dtidy_modernize_UseNullptrCheck.cpp-3Frev-3D245471-26r1-3D245470-26r2-3D245471-26view-3Ddiff&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=vEGzlOUc6IO5ny5JKNkJAUEoiokQ1N60GDcHk0yboKQ&s=4y-EkuMJJlcYjI15KrZY8VE3eGEhkvg9ScDcHtItY2g&e= <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_clang-2Dtools-2Dextra_trunk_clang-2Dtidy_modernize_UseNullptrCheck.cpp-3Frev-3D245471-26r1-3D245470-26r2-3D245471-26view-3Ddiff&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=vEGzlOUc6IO5ny5JKNkJAUEoiokQ1N60GDcHk0yboKQ&s=4y-EkuMJJlcYjI15KrZY8VE3eGEhkvg9ScDcHtItY2g&e=> 
>>> ==============================================================================
>>> --- clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp (original)
>>> +++ clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp Wed Aug 19 12:50:22 2015
>>> @@ -175,10 +175,10 @@ private:
>>> class CastSequenceVisitor : public RecursiveASTVisitor<CastSequenceVisitor> {
>>> public:
>>>   CastSequenceVisitor(ASTContext &Context,
>>> -                      SmallVector<StringRef, 1> UserNullMacros,
>>> +                      ArrayRef<StringRef> UserNullMacros,
>>>                       ClangTidyCheck &check)
>>>       : SM(Context.getSourceManager()), Context(Context),
>>> -        UserNullMacros(std::move(UserNullMacros)), Check(check),
>>> +        UserNullMacros(UserNullMacros), Check(check),
>>>         FirstSubExpr(nullptr), PruneSubtree(false) {}
>>> 
>>>   bool TraverseStmt(Stmt *S) {
>>> @@ -435,7 +435,7 @@ private:
>>> private:
>>>   SourceManager &SM;
>>>   ASTContext &Context;
>>> -  const SmallVector<StringRef, 1> &UserNullMacros;
>>> +  ArrayRef<StringRef> UserNullMacros;
>>>   ClangTidyCheck &Check;
>>>   Expr *FirstSubExpr;
>>>   bool PruneSubtree;
>>> 
>>> 
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at lists.llvm.org <mailto:cfe-commits at lists.llvm.org>
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Dcommits&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=vEGzlOUc6IO5ny5JKNkJAUEoiokQ1N60GDcHk0yboKQ&s=UUHB6kbqbYNAr9eIu4oMQTKtxnQ37-xusL7D-UY0GR4&e= <https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Dcommits&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=vEGzlOUc6IO5ny5JKNkJAUEoiokQ1N60GDcHk0yboKQ&s=UUHB6kbqbYNAr9eIu4oMQTKtxnQ37-xusL7D-UY0GR4&e=> 
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150819/61922c6f/attachment-0001.html>


More information about the cfe-commits mailing list