Re: [PATCH] D9600: Add scan-build python implementation

2015-11-19 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Hi Laszlo, thanks for the update! Some high-level questions/comments (and various small things I noticed inline). - I tried running scan-build in interposition mode (i.e., uncommenting out #"$SCRIPT_DIR/analyze-build" $@ in scan-build) and got python compile errors.

r253630 - [analyzer] DeadStoresChecker: Treat locals captured by reference in C++ lambdas as escaped.

2015-11-19 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Nov 19 19:53:44 2015 New Revision: 253630 URL: http://llvm.org/viewvc/llvm-project?rev=253630&view=rev Log: [analyzer] DeadStoresChecker: Treat locals captured by reference in C++ lambdas as escaped. The analyzer currently reports dead store false positives when a loc

Re: [PATCH] D9600: Add scan-build python implementation

2015-11-21 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Thanks Laszlo! Is there a more descriptive name than "intercept-build" (I realize scan-build is pretty general too). It seems to me the point of the intercept-build tool is to generate the compilation database. I think it would be helpful if the tool name indicated t

r254007 - [analyzer] Pass value expression for inlined defensive checks when binding null to nonnull.

2015-11-24 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Nov 24 13:15:11 2015 New Revision: 254007 URL: http://llvm.org/viewvc/llvm-project?rev=254007&view=rev Log: [analyzer] Pass value expression for inlined defensive checks when binding null to nonnull. The nullability checker was not suppressing false positives resultin

r254107 - [analyzer] Include block capture copy expressions in the CFG.

2015-11-25 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Nov 25 16:35:37 2015 New Revision: 254107 URL: http://llvm.org/viewvc/llvm-project?rev=254107&view=rev Log: [analyzer] Include block capture copy expressions in the CFG. This prevents spurious dead store warnings when a C++ lambda is casted to a block. I've also adde

r254114 - [analyzer] Add tests for generalized lambda capture (C++14). NFC.

2015-11-25 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Nov 25 18:11:23 2015 New Revision: 254114 URL: http://llvm.org/viewvc/llvm-project?rev=254114&view=rev Log: [analyzer] Add tests for generalized lambda capture (C++14). NFC. Add tests demonstrating that the analyzer supports generalized lambda capture. This support fa

Re: [PATCH] D15007: [analyzer] Improve modelling of nullptr_t in the analyzer. Fix PR25414.

2015-11-28 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Gabor, thanks for taking a look at this! I'm not sure `RegionStore::getBinding()` is the right place to put this logic. First, not all dereferences of a `std::nullptr_t` value go through `getBinding()`, so, for example, the following snippet triggers the assertion ev

r254639 - [analyzer] Suppress stack address escape on CK_CopyAndAutoreleaseBlockObject.

2015-12-03 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Dec 3 13:41:24 2015 New Revision: 254639 URL: http://llvm.org/viewvc/llvm-project?rev=254639&view=rev Log: [analyzer] Suppress stack address escape on CK_CopyAndAutoreleaseBlockObject. Don't warn about addresses of stack-allocated blocks escaping if the block region w

r254702 - [analyzer] Support inlining lambda-converted blocks.

2015-12-03 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Dec 3 23:00:36 2015 New Revision: 254702 URL: http://llvm.org/viewvc/llvm-project?rev=254702&view=rev Log: [analyzer] Support inlining lambda-converted blocks. clang converts C++ lambdas to blocks with an implicit user-defined conversion operator method on the lambda

Re: r254704 - Fix an unused variable warning in released builds. While there use 'auto' to simplify code.

2015-12-03 Thread Devin Coughlin via cfe-commits
Thanks! Devin > On Dec 3, 2015, at 9:27 PM, Craig Topper via cfe-commits > wrote: > > Author: ctopper > Date: Thu Dec 3 23:27:29 2015 > New Revision: 254704 > > URL: http://llvm.org/viewvc/llvm-project?rev=254704&view=rev > Log: > Fix an unused variable warning in released builds. While there

Re: [PATCH] D15007: [analyzer] Improve modelling of nullptr_t in the analyzer. Fix PR25414.

2015-12-04 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. LGTM. Thanks Gabor! http://reviews.llvm.org/D15007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

Re: [PATCH] D9600: Add scan-build python implementation

2015-12-04 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Thanks Laszlo. I'm still not convinced that all the python package stuff is needed because scan-build is distributed with clang (see my question inline). Also, what do you think about renaming intercept-build to "log-build" or some of the other alternatives I propose

Re: [PATCH] D13126: New static analyzer checker for loss of sign/precision

2015-12-04 Thread Devin Coughlin via cfe-commits
dcoughlin added a subscriber: dcoughlin. dcoughlin added a comment. In http://reviews.llvm.org/D13126#302328, @danielmarjamaki wrote: > When scanning 692 projects with this checker I got 56 warnings. I've triaged > 21 random warnings of these so far and saw 20 TP and 1 FP. > > When I have triage

r254806 - [analyzer] Fix MemRegion crash casting non-struct to derived struct (PR25426).

2015-12-04 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Dec 4 18:22:36 2015 New Revision: 254806 URL: http://llvm.org/viewvc/llvm-project?rev=254806&view=rev Log: [analyzer] Fix MemRegion crash casting non-struct to derived struct (PR25426). This commit prevents MemRegion::getAsOffset() from crashing when the analyzed prog

r254962 - [analyzer] Fix crash when lambda captures a variable-length array.

2015-12-07 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Dec 7 17:01:53 2015 New Revision: 254962 URL: http://llvm.org/viewvc/llvm-project?rev=254962&view=rev Log: [analyzer] Fix crash when lambda captures a variable-length array. When a C++ lambda captures a variable-length array, it creates a capture field to store the si

Re: [PATCH] D9600: Add scan-build python implementation

2015-12-09 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. In http://reviews.llvm.org/D9600#305980, @rizsotto.mailinglist wrote: > > Also, what do you think about renaming intercept-build to "log-build" or > > some of the other alternatives I proposed above? I think it is important > > for the name of the executable to commun

Re: [PATCH] D9600: Add scan-build python implementation

2015-12-10 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: tools/scan-build-py/libear/ear.c:140 @@ +139,3 @@ +#ifdef HAVE_NSGETENVIRON +environ = *_NSGetEnviron(); +#endif The issue I am seeing with library-interposition on OS X seems to be caused by eagerly stashing *_NSG

Re: [PATCH] D9600: Add scan-build python implementation

2015-12-11 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: tools/scan-build-py/README.md:85 @@ +84,3 @@ + +The 2. mode is available only on FreeBSD, Linux and OSX. Where library preload +is available from the dynamic loader. On OSX System Integrity Protection security My comme

Re: [PATCH] D9600: Add scan-build python implementation

2015-12-12 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: tools/scan-build-py/libear/ear.c:142 @@ +141,3 @@ +#endif +if (!initialized) +initialized = bear_capture_env_t(&initial_env); rizsotto.mailinglist wrote: > rizsotto.mailinglist wrote: > > to run the full tes

Re: [PATCH] D9600: Add scan-build python implementation

2015-12-16 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Thanks for adding `bear_get_environment()` to handle the environment weirdness on Darwin. Comment at: tools/scan-build-py/libscanbuild/intercept.py:146 @@ +145,3 @@ +}) +elif sys.platform == 'darwin': +logging.debug('intercept gonn

r255859 - [analyzer] Better detect when C++ object was constructed into existing region.

2015-12-16 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Dec 16 18:28:33 2015 New Revision: 255859 URL: http://llvm.org/viewvc/llvm-project?rev=255859&view=rev Log: [analyzer] Better detect when C++ object was constructed into existing region. When the analyzer evaluates a CXXConstructExpr, it looks ahead in the CFG for the

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-07 Thread Devin Coughlin via cfe-commits
https://github.com/devincoughlin commented: This is great to see! https://github.com/llvm/llvm-project/pull/114606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-07 Thread Devin Coughlin via cfe-commits
https://github.com/devincoughlin edited https://github.com/llvm/llvm-project/pull/114606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-07 Thread Devin Coughlin via cfe-commits
@@ -0,0 +1,117 @@ +//===- MemoryUnsafeCastChecker.cpp -*- C++ -*-==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apach

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-20 Thread Devin Coughlin via cfe-commits
devincoughlin wrote: Thanks Rashmi! I suggest pulling the minor ASTMatcher infrastructure improvements for Objective-C into a separate PR and merging that first, separately from the new checker. For the ASTMatcher work, @AaronBallman is a good person to review. https://github.com/llvm/llvm-pr

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-19 Thread Devin Coughlin via cfe-commits
@@ -0,0 +1,132 @@ +//===- MemoryUnsafeCastChecker.cpp -*- C++ -*-==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apach

[clang] [clang] Implement -fstrict-bool (PR #116732)

2024-12-03 Thread Devin Coughlin via cfe-commits
https://github.com/devincoughlin commented: You should split out the change to add the flag from the change to enable it by default for kernel/kexts. https://github.com/llvm/llvm-project/pull/116732 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [clang] Implement -fstrict-bool (PR #116732)

2024-12-03 Thread Devin Coughlin via cfe-commits
https://github.com/devincoughlin approved this pull request. https://github.com/llvm/llvm-project/pull/116732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement -fstrict-bool (PR #116732)

2024-12-03 Thread Devin Coughlin via cfe-commits
@@ -6052,6 +6054,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (!RawTriple.isOSDarwin() && !RawTriple.isNVPTX()) CmdArgs.push_back("-mconstructor-aliases"); + // Assume -fno-strict-bool in the Darwin kernel. + if (KernelOrKext) ---

<    1   2   3   4   5