r326062 - [www] Update link to analyzer's "Building a Checker in 24 hours" video

2018-02-25 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sun Feb 25 16:39:25 2018 New Revision: 326062 URL: http://llvm.org/viewvc/llvm-project?rev=326062&view=rev Log: [www] Update link to analyzer's "Building a Checker in 24 hours" video The video is now uploaded to YouTube. Modified: cfe/trunk/www/analyzer/alpha_checks.h

r356308 - [analyzer] Teach scan-build to find clang when installed in /usr/local/bin/

2019-03-15 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Mar 15 18:01:29 2019 New Revision: 356308 URL: http://llvm.org/viewvc/llvm-project?rev=356308&view=rev Log: [analyzer] Teach scan-build to find clang when installed in /usr/local/bin/ Change scan-build to support the scenario where scan-build is installed in $TOOLCHAIN

[PATCH] D24709: [analyzer] SATestBuild.py: Treat '#' as comment in projectMap.csv

2016-09-18 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added reviewers: zaks.anna, NoQ. dcoughlin added a subscriber: cfe-commits. Treat lines in projectMap.csv that start with '#' as comments. This enables a workflow where projects can be temporarily disabled with a comment describing when they should be t

Re: [PATCH] D24709: [analyzer] SATestBuild.py: Treat '#' as comment in projectMap.csv

2016-09-18 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281880: [analyzer] SATestBuild.py: Treat '#' as comment in projectMap.csv (authored by dcoughlin). Changed prior to commit: https://reviews.llvm.org/D24709?vs=71757&id=71766#toc Repository: rL LLVM

r281880 - [analyzer] SATestBuild.py: Treat '#' as comment in projectMap.csv

2016-09-18 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sun Sep 18 20:36:40 2016 New Revision: 281880 URL: http://llvm.org/viewvc/llvm-project?rev=281880&view=rev Log: [analyzer] SATestBuild.py: Treat '#' as comment in projectMap.csv Treat lines in projectMap.csv that start with '#' as comments. This enables a workflow where pr

Re: [PATCH] D24759: [RFC][StaticAnalyser] fix unreachable code false positives when block numbers mismatch

2016-09-20 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. @danielmarjamaki I see what you mean -- thanks for providing the patch. I don't think this is the right approach. It should be sufficient to reason about blocks and not individual statements; further some blocks may be non-empty but not have any statements. Instead,

Re: [PATCH] D24759: [RFC][StaticAnalyser] fix unreachable code false positives when block numbers mismatch

2016-09-20 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Here is the discussion on cfe-dev. http://lists.llvm.org/pipermail/cfe-dev/2016-September/050800.html What's going on is that the path-sensitive unreachable code checker traverses blocks in the unoptimized CFG and emits a diagnostic if a block in that CFG is not reac

Re: [PATCH] D24792: [analyzer] Fix crash in RetainCountChecker::checkEndFunction

2016-09-21 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. I suspect I introduced this regression in r264687. Repository: rL LLVM https://reviews.llvm.org/D24792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24759: [RFC][StaticAnalyser] fix unreachable code false positives when block numbers mismatch

2016-09-23 Thread Devin Coughlin via cfe-commits
dcoughlin requested changes to this revision. dcoughlin added a reviewer: dcoughlin. This revision now requires changes to proceed. Comment at: lib/Analysis/CFG.cpp:2986 @@ -2985,3 +2985,1 @@ -if (!KnownVal.isFalse()) { - // Add an intermediate block between the BodyBlo

Re: [PATCH] D23236: When ARC is enabled, no warning will be generated when a method1. Returns 'nil' in a method that is attributed to return a 'nonnull'2. The return-statement is a ConditionalOperator

2016-09-26 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. LGTM. https://reviews.llvm.org/D23236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23236: When ARC is enabled, no warning will be generated when a method1. Returns 'nil' in a method that is attributed to return a 'nonnull'2. The return-statement is a ConditionalOperator

2016-09-27 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. @parallaxe Do you need someone to commit this for you? https://reviews.llvm.org/D23236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24759: [RFC][StaticAnalyser] fix unreachable code false positives when block numbers mismatch

2016-09-30 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. LGTM. Please commit! https://reviews.llvm.org/D24759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D24905: Fix unreachable code false positive, vardecl in switch

2016-09-30 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Sorry, missed this patch. I think it would good to add a test to make sure we do warn when the var decl has an initializer, since that will not be executed. void varDecl(int X) { switch (X) { int A = 12; // We do want a warning here, since the variable wil

[PATCH] D23236: When ARC is enabled, no warning will be generated when a method1. Returns 'nil' in a method that is attributed to return a 'nonnull'2. The return-statement is a ConditionalOperator, wh

2016-09-30 Thread Devin Coughlin via cfe-commits
dcoughlin requested changes to this revision. dcoughlin added a comment. This revision now requires changes to proceed. Upon reflection, I don't think this is the right approach. Desugaring any AttributedType in the return type seems like a really, really big hammer and could be an unexpected su

[PATCH] D23236: When ARC is enabled, no warning will be generated when a method1. Returns 'nil' in a method that is attributed to return a 'nonnull'2. The return-statement is a ConditionalOperator, wh

2016-10-06 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D23236#561467, @parallaxe wrote: > In https://reviews.llvm.org/D23236#557898, @dcoughlin wrote: > > > Upon reflection, I don't think this is the right approach. > > > > Desugaring any AttributedType in the return type seems like a really, >

[PATCH] D23236: When ARC is enabled, no warning will be generated when a method1. Returns 'nil' in a method that is attributed to return a 'nonnull'2. The return-statement is a ConditionalOperator, wh

2016-10-06 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. I left out the example I was describing above for 'InitializationSequence::Perform()': @interface Bar - (nonnull Bar *)method; @end @implementation Bar - (Bar *)method { return 0; } @end https://reviews.llvm.org/D23236

[PATCH] D25326: [StaticAnalyser] Don't merge different returns in ExplodedGraph

2016-10-07 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Can you also add a test that tests this more directly (i.e., with clang_analyzer_warnIfReached). I don't think it is good to have the only test for this core coverage issue to be in tests for an alpha checker. Adding the direct test would also make it easier to track

[PATCH] D25326: [StaticAnalyser] Don't merge different returns in ExplodedGraph

2016-10-10 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: test/Analysis/unreachable-code-path.c:201 +static int inlineFunction(const int i) { + if (table[i] != 0) +return 1; danielmarjamaki wrote: > NoQ wrote: > > a.sidorin wrote: > > > I have a small question. Is it pos

[PATCH] D25326: [StaticAnalyser] Don't merge different returns in ExplodedGraph

2016-10-10 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D25326#565919, @danielmarjamaki wrote: > In https://reviews.llvm.org/D25326#564584, @zaks.anna wrote: > > > Please, fix the style issues before committing. > > > Would it be ok to run clang-format on some files to clean up the formatting? >

r284084 - [analyzer] DeallocChecker: Don't warn about directly-set IBOutlet ivars on macOS

2016-10-12 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Oct 12 18:57:05 2016 New Revision: 284084 URL: http://llvm.org/viewvc/llvm-project?rev=284084&view=rev Log: [analyzer] DeallocChecker: Don't warn about directly-set IBOutlet ivars on macOS On macOS (but not iOS), if an ObjC property has no setter, the nib-loading code

[PATCH] D25326: [StaticAnalyser] Don't merge different returns in ExplodedGraph

2016-10-14 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D25326#569061, @danielmarjamaki wrote: > > You could also try to add a canary with clang analyzer eval after the if > > statement to force the test to fail if we do add this symbolic reasoning. > > sounds good. sorry but I don't see how to d

r284317 - Revert "[analyzer] Re-apply r283093 "Add extra notes to ObjCDeallocChecker""

2016-10-15 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sat Oct 15 19:30:08 2016 New Revision: 284317 URL: http://llvm.org/viewvc/llvm-project?rev=284317&view=rev Log: Revert "[analyzer] Re-apply r283093 "Add extra notes to ObjCDeallocChecker"" Revert: r283662: [analyzer] Re-apply r283093 "Add extra notes to ObjCDeallocChecker"

r284335 - [analyzer] Make MallocChecker more robust against custom redeclarations

2016-10-16 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sun Oct 16 12:26:06 2016 New Revision: 284335 URL: http://llvm.org/viewvc/llvm-project?rev=284335&view=rev Log: [analyzer] Make MallocChecker more robust against custom redeclarations Add additional checking to MallocChecker to avoid crashing when memory routines have unex

Re: r284335 - [analyzer] Make MallocChecker more robust against custom redeclarations

2016-10-16 Thread Devin Coughlin via cfe-commits
> On Oct 16, 2016, at 12:04 PM, Renato Golin wrote: > > On 16 October 2016 at 18:26, Devin Coughlin via cfe-commits > wrote: >> Author: dcoughlin >> Date: Sun Oct 16 12:26:06 2016 >> New Revision: 284335 >> >> URL: http://llvm.org/viewvc/llvm-projec

r284340 - Revert "[analyzer] Make MallocChecker more robust against custom redeclarations"

2016-10-16 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sun Oct 16 14:26:07 2016 New Revision: 284340 URL: http://llvm.org/viewvc/llvm-project?rev=284340&view=rev Log: Revert "[analyzer] Make MallocChecker more robust against custom redeclarations" This reverts commit r284335. It appears to be causing test-suite compile-time a

Re: r284335 - [analyzer] Make MallocChecker more robust against custom redeclarations

2016-10-16 Thread Devin Coughlin via cfe-commits
> On Oct 16, 2016, at 12:12 PM, Devin Coughlin via cfe-commits > wrote: > >> >> On Oct 16, 2016, at 12:04 PM, Renato Golin wrote: >> >> On 16 October 2016 at 18:26, Devin Coughlin via cfe-commits >> wrote: >>> Author: dcoughlin >>>

Re: r284335 - [analyzer] Make MallocChecker more robust against custom redeclarations

2016-10-16 Thread Devin Coughlin via cfe-commits
> On Oct 16, 2016, at 12:53 PM, Renato Golin wrote: > > On 16 October 2016 at 20:36, Devin Coughlin wrote: >> Reverted in r284340. > > Hi Devin, > > Sometimes Clang patches break on stage 2 or test-suite, but this is > not the case. I dug deeper and found that there was another commit, > not

r284351 - Revert "Revert "[analyzer] Make MallocChecker more robust against custom redeclarations""

2016-10-16 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sun Oct 16 17:19:03 2016 New Revision: 284351 URL: http://llvm.org/viewvc/llvm-project?rev=284351&view=rev Log: Revert "Revert "[analyzer] Make MallocChecker more robust against custom redeclarations"" This reverts commit r284340 to reapply r284335. The bot breakage was d

r318979 - [analyzer] Teach RetainCountChecker about CoreMedia APIs

2017-11-25 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sat Nov 25 06:57:42 2017 New Revision: 318979 URL: http://llvm.org/viewvc/llvm-project?rev=318979&view=rev Log: [analyzer] Teach RetainCountChecker about CoreMedia APIs Teach the retain-count checker that CoreMedia reference types use CoreFoundation-style reference countin

r319333 - [analyzer] Fix unreachable creating PathDiagnosticLocation with widen-loops=true

2017-11-29 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Nov 29 10:25:37 2017 New Revision: 319333 URL: http://llvm.org/viewvc/llvm-project?rev=319333&view=rev Log: [analyzer] Fix unreachable creating PathDiagnosticLocation with widen-loops=true In the original design of the analyzer, it was assumed that a BlockEntrance does

r319638 - [analyzer] Don't treat lambda-captures float constexprs as undefined

2017-12-03 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sun Dec 3 20:46:47 2017 New Revision: 319638 URL: http://llvm.org/viewvc/llvm-project?rev=319638&view=rev Log: [analyzer] Don't treat lambda-captures float constexprs as undefined RegionStore has special logic to evaluate captured constexpr variables. However, if the cons

[clang] Add option -fstdlib-hardening= (PR #78763)

2024-01-26 Thread Devin Coughlin via cfe-commits
@@ -7730,6 +7730,14 @@ def source_date_epoch : Separate<["-"], "source-date-epoch">, } // let Visibility = [CC1Option] +def stdlib_hardening_EQ : Joined<["-"], "fstdlib-hardening=">, devincoughlin wrote: With the name `stdlib_hardening`, are we worried that

r309968 - [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output

2017-08-03 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Aug 3 11:12:22 2017 New Revision: 309968 URL: http://llvm.org/viewvc/llvm-project?rev=309968&view=rev Log: [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output This change adds support for cross-file diagnostic paths in html output. If the

r311063 - [analyzer] Add support for reference counting of parameters on the callee side

2017-08-16 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Aug 16 21:19:07 2017 New Revision: 311063 URL: http://llvm.org/viewvc/llvm-project?rev=311063&view=rev Log: [analyzer] Add support for reference counting of parameters on the callee side This commit adds the functionality of performing reference counting on the callee

[clang] 0aba69e - [analyzer] Add test directory for scan-build.

2019-11-04 Thread Devin Coughlin via cfe-commits
Author: Devin Coughlin Date: 2019-11-04T20:26:35-08:00 New Revision: 0aba69eb1a01c44185009f50cc633e3c648e9950 URL: https://github.com/llvm/llvm-project/commit/0aba69eb1a01c44185009f50cc633e3c648e9950 DIFF: https://github.com/llvm/llvm-project/commit/0aba69eb1a01c44185009f50cc633e3c648e9950.diff

[clang] 48223d9 - [analyzer] Fixup scan-build tests for non-Darwin platforms.

2019-11-04 Thread Devin Coughlin via cfe-commits
Author: Devin Coughlin Date: 2019-11-04T21:12:11-08:00 New Revision: 48223d92a98e2eb7da6844d56471953f83da191e URL: https://github.com/llvm/llvm-project/commit/48223d92a98e2eb7da6844d56471953f83da191e DIFF: https://github.com/llvm/llvm-project/commit/48223d92a98e2eb7da6844d56471953f83da191e.diff

[clang] abc04ff - [analyzer] Require darwin for scan-build tests

2019-11-04 Thread Devin Coughlin via cfe-commits
Author: Devin Coughlin Date: 2019-11-04T21:17:55-08:00 New Revision: abc04ff4012c62c98aa9f0d840114b2f56855dc8 URL: https://github.com/llvm/llvm-project/commit/abc04ff4012c62c98aa9f0d840114b2f56855dc8 DIFF: https://github.com/llvm/llvm-project/commit/abc04ff4012c62c98aa9f0d840114b2f56855dc8.diff

r289685 - [Driver] Add tests for enabled static analyzer checkers.

2016-12-14 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Dec 14 12:46:01 2016 New Revision: 289685 URL: http://llvm.org/viewvc/llvm-project?rev=289685&view=rev Log: [Driver] Add tests for enabled static analyzer checkers. The driver passes flags to cc1 that enable various checkers based on the target triple. This commit adds

r289873 - [analyzer] Add a new SVal to support pointer-to-member operations.

2016-12-15 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Dec 15 15:27:06 2016 New Revision: 289873 URL: http://llvm.org/viewvc/llvm-project?rev=289873&view=rev Log: [analyzer] Add a new SVal to support pointer-to-member operations. Add a new type of NonLoc SVal for C++ pointer-to-member operations. This SVal supports both po

r289970 - [analyzer] Fix crash in MallocChecker.

2016-12-16 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Dec 16 12:41:40 2016 New Revision: 289970 URL: http://llvm.org/viewvc/llvm-project?rev=289970&view=rev Log: [analyzer] Fix crash in MallocChecker. Fix a crash in the MallocChecker when the extent size for the argument to new[] is not known. A patch by Abramo Bagnara a

r290023 - [analyzer] UnixAPIChecker: Don't diagnose for functions in C++ namespaces

2016-12-16 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Dec 16 19:08:17 2016 New Revision: 290023 URL: http://llvm.org/viewvc/llvm-project?rev=290023&view=rev Log: [analyzer] UnixAPIChecker: Don't diagnose for functions in C++ namespaces Update the UnixAPIChecker to not diagnose for calls to functions that are declared in C

r290140 - [analyzer] Add sink after construction of temporary with no-return destructor.

2016-12-19 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Dec 19 16:23:22 2016 New Revision: 290140 URL: http://llvm.org/viewvc/llvm-project?rev=290140&view=rev Log: [analyzer] Add sink after construction of temporary with no-return destructor. The analyzer's CFG currently doesn't have nodes for calls to temporary destructors

r290143 - [analyzer] Add checker modeling gtest APIs.

2016-12-19 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Dec 19 16:50:31 2016 New Revision: 290143 URL: http://llvm.org/viewvc/llvm-project?rev=290143&view=rev Log: [analyzer] Add checker modeling gtest APIs. gtest is a widely-used unit-testing API. It provides macros for unit test assertions: ASSERT_TRUE(p != nullptr);

r290352 - [analyzer] Update GTestChecker to tighten API detection

2016-12-22 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Dec 22 11:52:57 2016 New Revision: 290352 URL: http://llvm.org/viewvc/llvm-project?rev=290352&view=rev Log: [analyzer] Update GTestChecker to tighten API detection Update the GTestChecker to tighten up the API detection and make it cleaner in response to post-commit fe

r291581 - [analyzer] Treat pointers to static member functions as function pointers

2017-01-10 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Jan 10 12:49:27 2017 New Revision: 291581 URL: http://llvm.org/viewvc/llvm-project?rev=291581&view=rev Log: [analyzer] Treat pointers to static member functions as function pointers Sema treats pointers to static member functions as having function pointer type, so tre

r291635 - [analyzer] Fix crash in body farm for getter without implicit self.

2017-01-10 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Jan 10 19:02:34 2017 New Revision: 291635 URL: http://llvm.org/viewvc/llvm-project?rev=291635&view=rev Log: [analyzer] Fix crash in body farm for getter without implicit self. Fix a crash in body farm when synthesizing a getter for a property synthesized for a property

Re: [PATCH] D23375: Add kfree( ) to MallocChecker.cpp

2016-08-16 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. I would recommend putting the tests in existing test files next to tests that for similar diagnostics for other allocation/free schemes. So the test for printExpectedAllocName() should go in test/Analysis/free.c and the test for printExpectedDeallocName() should proba

Re: [PATCH] D15031: CFG: Add CFGElement for automatic variables that leave the scope

2016-08-16 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Thanks for patch! Some comments inline. You don't have to do it in this patch, but I think it would be good to get this working with AddImplicitDtors. I think it would also be good to (eventually) add CFGElements marking when the storage duration for underlying storag

r279181 - [analyzer] Weaken assertion in trackNullOrUndefValue()

2016-08-18 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Aug 18 20:05:31 2016 New Revision: 279181 URL: http://llvm.org/viewvc/llvm-project?rev=279181&view=rev Log: [analyzer] Weaken assertion in trackNullOrUndefValue() We should ignore paren casts when making sure that the semantic expression in a PseudoObjectExpr for an Ob

r279183 - [www] Add analyzer FAQ about not releasing ivars in -dealloc.

2016-08-18 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Aug 18 20:22:50 2016 New Revision: 279183 URL: http://llvm.org/viewvc/llvm-project?rev=279183&view=rev Log: [www] Add analyzer FAQ about not releasing ivars in -dealloc. Modified: cfe/trunk/www/analyzer/faq.html Modified: cfe/trunk/www/analyzer/faq.html URL: http

r279330 - [www] Add nullability questions to analyzer FAQ.

2016-08-19 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Aug 19 17:04:45 2016 New Revision: 279330 URL: http://llvm.org/viewvc/llvm-project?rev=279330&view=rev Log: [www] Add nullability questions to analyzer FAQ. Modified: cfe/trunk/www/analyzer/faq.html Modified: cfe/trunk/www/analyzer/faq.html URL: http://llvm.org/v

Re: [PATCH] D19979: [analyzer] ScopeContext - initial implementation

2016-08-21 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. This has been requested by PR29069 https://llvm.org/bugs/show_bug.cgi?id=29069 https://reviews.llvm.org/D19979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [PATCH] D23853: Assert in performTrivialCopy - Bug report and a possible solution

2016-08-24 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. I'm not sure that weakening the assert is the right thing to do here. It seems like if V is undef that the analyzer ideally ought to have issued a diagnostic (and a sink) somewhere before. Do you have a test case that reproduces? (It would be good to add that to the t

Re: [PATCH] D22968: [analyzer] A checker for macOS-specific bool-like objects.

2016-08-26 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/BoolConversionChecker.cpp:62 @@ +61,3 @@ + << "' to a plain boolean value: probably a forgotten " + << (IsObjC ? "'[boolValue]'" : "'->isTrue()'"); +BR.EmitBasicReport( - The

Re: [PATCH] D23375: Add kfree( ) to MallocChecker.cpp

2016-08-29 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D23375#527291, @andrewmw94 wrote: > One more thing, obviously it should mimic malloc/free's behavior in > complaining about delete/new being used. Should it also complain about > free/malloc being used? I can't imagine that would be some

r280174 - [analyzer] Use lazily created buffer in EmptyLocalizationContextChecker

2016-08-30 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Aug 30 18:07:14 2016 New Revision: 280174 URL: http://llvm.org/viewvc/llvm-project?rev=280174&view=rev Log: [analyzer] Use lazily created buffer in EmptyLocalizationContextChecker Fix a crash when relexing the underlying memory buffer to find incorrect arguments to NSL

[PATCH] D24163: [scan-build-py] Increase precision of timestamp in report directory name

2016-09-01 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added a reviewer: rizsotto.mailinglist. dcoughlin added a subscriber: cfe-commits. This patch improves compatibility with the perl version of scan-build. The perl version of scan-build produces output report directories with increasing lexicographic ord

Re: [PATCH] D24163: [scan-build-py] Increase precision of timestamp in report directory name

2016-09-06 Thread Devin Coughlin via cfe-commits
dcoughlin updated this revision to Diff 70458. dcoughlin added a comment. Fix the pep8 79-column violation. https://reviews.llvm.org/D24163 Files: tools/scan-build-py/libscanbuild/report.py tools/scan-build-py/tests/unit/test_report.py Index: tools/scan-build-py/tests/unit/test_report.py =

Re: [PATCH] D24163: [scan-build-py] Increase precision of timestamp in report directory name

2016-09-06 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280768: [scan-build-py] Increase precision of timestamp in report directory name (authored by dcoughlin). Changed prior to commit: https://reviews.llvm.org/D24163?vs=70458&id=70493#toc Repository: rL

r280768 - [scan-build-py] Increase precision of timestamp in report directory name

2016-09-06 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Sep 6 18:42:51 2016 New Revision: 280768 URL: http://llvm.org/viewvc/llvm-project?rev=280768&view=rev Log: [scan-build-py] Increase precision of timestamp in report directory name This commit improves compatibility with the perl version of scan-build. The perl versio

Re: [PATCH] D23963: [analyzer] pr28449 - Move literal rvalue construction away from RegionStore.

2016-09-09 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. I agree that it is weird that region store modifies the value it was asked to bind and over all this seems like the right approach. My big concern with this patch is that the logic that looks whether an lval is being stored into a non-reference location and dereferenc

[PATCH] D24470: [analyzer] scan-build-py: Remove relative path hack for SATestsBuild.py

2016-09-12 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added a reviewer: rizsotto.mailinglist. dcoughlin added a subscriber: cfe-commits. Remove the relative path hack in scan-build-py that converts a fully qualified directory name and a fully qualified file path to a relative path before running the analyz

r281516 - [analyzer] scan-build-py: Remove relative path hack for SATestsBuild.py

2016-09-14 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Sep 14 13:14:11 2016 New Revision: 281516 URL: http://llvm.org/viewvc/llvm-project?rev=281516&view=rev Log: [analyzer] scan-build-py: Remove relative path hack for SATestsBuild.py Remove the relative path hack in scan-build-py that converts a fully qualified directory

Re: [PATCH] D24470: [analyzer] scan-build-py: Remove relative path hack for SATestsBuild.py

2016-09-14 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281516: [analyzer] scan-build-py: Remove relative path hack for SATestsBuild.py (authored by dcoughlin). Changed prior to commit: https://reviews.llvm.org/D24470?vs=71046&id=71401#toc Repository: rL

Re: [cfe-dev] [Static Analyzer] Retain count checker does not warn about parameters that might leak

2016-09-15 Thread Devin Coughlin via cfe-commits
- cfe-dev, + cfe-commits Hi Tobias, This is a great start. Thanks for the patch! > Not sure I know how to use the analyzer config flags yet. My patch > currently also still causes a segfault on Analysis/retain-release.m The segfault is because the diagnostics machinery expects a declaration wit

Re: [PATCH] D20811: [analyzer] Model some library functions

2016-09-15 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Thanks for adding the macros. I've provided some feedback inline. I think a good rule of thumb for readability is: suppose you are a maintainer and need to add a summary for a new function. Can you copy the the summary for an existing function and figure out what each

Re: [PATCH] D20811: [analyzer] Model some library functions

2016-09-16 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. I think this is much clearer! That said, now that I look at it with 'POSTCONDITION' alone I don't think it is clear that the provided value describes the return value. What do you think about renaming it 'RETURN_VALUE'? Or adding back the RET_VAL I asked you about rem

Re: [PATCH] D20811: [analyzer] Model some library functions

2016-09-16 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D20811#544981, @NoQ wrote: > Hmm, what about > > CONSTRAIN > ARGUMENT_VALUE(0, WithinRange) > RANGE('0', '9') > RANGE('A', 'Z') > RANGE('a', 'z') > END_ARGUMENT_VALUE > RETURN_VALUE(OutOfRange) > VALUE(0)

Re: [PATCH] D24278: [analyzer] Extend bug reports with extra notes.

2016-09-16 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. This is awesome! I have some minor comments on the dealloc notes. It is also fine to remove them entirely; we can add them in a later commit. Comment at: lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp:604 @@ -588,1 +603,3 @@ +addExtraNoteForDe

r292874 - Revert "[analyzer] Fix memory space of static locals seen from nested blocks."

2017-01-23 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Jan 23 20:10:59 2017 New Revision: 292874 URL: http://llvm.org/viewvc/llvm-project?rev=292874&view=rev Log: Revert "[analyzer] Fix memory space of static locals seen from nested blocks." This reverts commit r292800. It is causing null pointer dereference false positiv

Re: r292800 - [analyzer] Fix memory space of static locals seen from nested blocks.

2017-01-23 Thread Devin Coughlin via cfe-commits
FYI, I reverted r292800 from trunk in r292874. It was causing our internal validation bots to have false positives whenever a static local was dereferenced/passed to a nonnull function in a block evaluated at the top level. Devin > On Jan 23, 2017, at 4:19 PM, Hans Wennborg wrote: > > Merged

r308242 - [analyzer] Add missing documentation for static analyzer checkers

2017-07-17 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Jul 17 17:34:57 2017 New Revision: 308242 URL: http://llvm.org/viewvc/llvm-project?rev=308242&view=rev Log: [analyzer] Add missing documentation for static analyzer checkers Some checks did not have documentation in the www/analyzer/ folder and also some alpha checks b

r308416 - [analyzer] Add annotation attribute to trust retain count implementation

2017-07-18 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Jul 18 21:10:44 2017 New Revision: 308416 URL: http://llvm.org/viewvc/llvm-project?rev=308416&view=rev Log: [analyzer] Add annotation attribute to trust retain count implementation Add support to the retain-count checker for an annotation indicating that a function's i

r308990 - [analyzer] Add diagnostic text for generalized refcount annotations.

2017-07-25 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Jul 25 10:17:09 2017 New Revision: 308990 URL: http://llvm.org/viewvc/llvm-project?rev=308990&view=rev Log: [analyzer] Add diagnostic text for generalized refcount annotations. Add a 'Generalized' object kind to the retain-count checker and suitable generic diagnostic

r323052 - [analyzer] Provide a check name when MallocChecker enables CStringChecker

2018-01-20 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sat Jan 20 15:11:17 2018 New Revision: 323052 URL: http://llvm.org/viewvc/llvm-project?rev=323052&view=rev Log: [analyzer] Provide a check name when MallocChecker enables CStringChecker Fix an assertion failure caused by a missing CheckName. The malloc checker enables "bas

r296562 - [Analyzer] Fix crash in ObjCPropertyChecker on protocol property

2017-02-28 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Feb 28 19:47:37 2017 New Revision: 296562 URL: http://llvm.org/viewvc/llvm-project?rev=296562&view=rev Log: [Analyzer] Fix crash in ObjCPropertyChecker on protocol property Fix a crash in the ObjCPropertyChecker when analyzing a 'copy' property of an NSMutable* type in

r296646 - [analyzer] pr32088: Don't destroy the temporary if its initializer causes return.

2017-03-01 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Mar 1 11:48:39 2017 New Revision: 296646 URL: http://llvm.org/viewvc/llvm-project?rev=296646&view=rev Log: [analyzer] pr32088: Don't destroy the temporary if its initializer causes return. In the following code involving GNU statement-expression extension: struct S

r286901 - [analyzer] Fix crash in NullabilityChecker calling block with too few arguments

2016-11-14 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Nov 14 16:46:02 2016 New Revision: 286901 URL: http://llvm.org/viewvc/llvm-project?rev=286901&view=rev Log: [analyzer] Fix crash in NullabilityChecker calling block with too few arguments Fix a crash when checking parameter nullability on a block invocation with fewer

[PATCH] D26644: [analyzer] Rename assumeWithinInclusiveRange*()

2016-11-14 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. LGTM, other then some indentation issues for arguments and parameters after the rename. Please fix those and commit! And thanks for splitting this up. Comment at: inc

[PATCH] D26642: [analyzer] Minor optimization: avoid setting state if unchanged

2016-11-14 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. LGTM. Please commit! https://reviews.llvm.org/D26642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

r287001 - [analyzer] Add check for when block is called with too few arguments.

2016-11-15 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Nov 15 12:40:46 2016 New Revision: 287001 URL: http://llvm.org/viewvc/llvm-project?rev=287001&view=rev Log: [analyzer] Add check for when block is called with too few arguments. The CallAndMessageChecker has an existing check for when a function pointer is called with

r287063 - [www] Update analyzer website for release of checker-279

2016-11-15 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Nov 15 18:47:56 2016 New Revision: 287063 URL: http://llvm.org/viewvc/llvm-project?rev=287063&view=rev Log: [www] Update analyzer website for release of checker-279 Modified: cfe/trunk/www/analyzer/index.html cfe/trunk/www/analyzer/latest_checker.html.incl

r287105 - [www] Fix spelling error in checker release notes.

2016-11-16 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Nov 16 08:23:41 2016 New Revision: 287105 URL: http://llvm.org/viewvc/llvm-project?rev=287105&view=rev Log: [www] Fix spelling error in checker release notes. Modified: cfe/trunk/www/analyzer/release_notes.html Modified: cfe/trunk/www/analyzer/release_notes.html U

[PATCH] D26768: [analyzer] Improve VirtualCallChecker diagnostics and move out of alpha

2016-11-16 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added reviewers: zaks.anna, NoQ. dcoughlin added subscribers: cfe-commits, alexfh. The VirtualCallChecker is in alpha because its interprocedural diagnostics represent the call path textually in the diagnostic message rather than with a path sensitive d

[PATCH] D26762: Add a method to obtain this SVal of a method that created given StackFrameCtx

2016-11-16 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Thanks for the patch! How does this differ from `getCXXThisVal()` on `CXXInstanceCall` and its subclasses in CallEvent.h? Can that be used instead? Or are there places where you need access to this without a CallEvent? Also: it seems like there are a lot of places in

Re: Crash in MallocChecker

2016-11-30 Thread Devin Coughlin via cfe-commits
+ Artem and Daniel, Thanks for the patch! This fix seems reasonable to me, although it would good to add the reproducer as test case! (tests/Analysis/malloc.cpp would be a fine place for it). Devin Index: lib/StaticAnalyzer/Checkers/MallocChecker.cpp ===

r288922 - [analyzer] Fix typo in nullability checker diagnostic

2016-12-07 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Dec 7 11:36:27 2016 New Revision: 288922 URL: http://llvm.org/viewvc/llvm-project?rev=288922&view=rev Log: [analyzer] Fix typo in nullability checker diagnostic 'infered' --> 'inferred' Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp Modif

r289309 - [analyzer] Improve VirtualCallChecker diagnostics and move into optin package.

2016-12-09 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Dec 9 19:16:09 2016 New Revision: 289309 URL: http://llvm.org/viewvc/llvm-project?rev=289309&view=rev Log: [analyzer] Improve VirtualCallChecker diagnostics and move into optin package. The VirtualCallChecker is in alpha because its interprocedural diagnostics represe

[PATCH] D25475: [analyzer] Add a new SVal to support pointer-to-member operations.

2016-10-18 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineC.cpp:462 + case CK_ReinterpretMemberPointer: { +const Expr *UOExpr = CastE->getSubExpr()->IgnoreParenCasts(); +assert(isa(UOExpr) && I don't think pattern matchin

[PATCH] D25475: [analyzer] Add a new SVal to support pointer-to-member operations.

2016-10-18 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineC.cpp:462 + case CK_ReinterpretMemberPointer: { +const Expr *UOExpr = CastE->getSubExpr()->IgnoreParenCasts(); +assert(isa(UOExpr) && dcoughlin wrote: > I don't th

[PATCH] D25475: [analyzer] Add a new SVal to support pointer-to-member operations.

2016-10-18 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineC.cpp:462 + case CK_ReinterpretMemberPointer: { +const Expr *UOExpr = CastE->getSubExpr()->IgnoreParenCasts(); +assert(isa(UOExpr) && dcoughlin wrote: > dcoughlin

[PATCH] D20811: [analyzer] Model some library functions

2016-10-20 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D20811#575521, @NoQ wrote: > I thought to give it a pause to take a fresh look at how to arrange the > macro-hints in the summaries. > > Maybe something like that: > > CASE > ARGUMENT_CONDITION(ARG_NO(0), OutOfRange) > RANGE('0',

[PATCH] D20811: [analyzer] Model some library functions

2016-10-21 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This looks great! Comment at: lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:694 +INVALIDATION_APPROACH(EvalCallAsPure)) + CASE // Is certainly uppercase. +ARGUMENT_CONDITION(ARG_N

[PATCH] D25876: [analyzer] Report CFNumberGetValue API misuse

2016-10-21 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: test/Analysis/CFNumber.c:39 + unsigned char scalar = 0; + CFNumberGetValue(x, kCFNumberSInt16Type, &scalar); // expected-warning{{A CFNumber object that represents a 16 bit integer is used to initialize an 8 bit integer. 8 bits of

[PATCH] D25876: [analyzer] Report CFNumberGetValue API misuse

2016-10-21 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. LGTM! https://reviews.llvm.org/D25876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25475: [analyzer] Add a new SVal to support pointer-to-member operations.

2016-10-24 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineC.cpp:462 + case CK_ReinterpretMemberPointer: { +const Expr *UOExpr = CastE->getSubExpr()->IgnoreParenCasts(); +assert(isa(UOExpr) && kromanenkov wrote: > dcoughli

[PATCH] D25909: [analyzer] MacOSXApiChecker: Disallow dispatch_once predicates on heap and in ivars.

2016-10-24 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp:92 + else if (isa(RS)) +os << " heap allocated memory"; + else if (isa(RS)) { "heap allocated" --> "heap-allocated" Comment at: lib/StaticAnalyz

[PATCH] D25909: [analyzer] MacOSXApiChecker: Disallow dispatch_once predicates on heap and in ivars.

2016-10-25 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp:94 + else if (isa(RS)) { +// FIXME: Presence of an IVar region has priority over this branch, because +// ObjC objects are on the heap even if the core doesn't realize this. ---

[PATCH] D25940: [analyzer] LibraryFunctions: Fix errors due to different integral types and typedefs on different architectures.

2016-10-25 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Are the parameter types actually needed? I think in general the rest of the analyzer uses arity alone. Is the idea to allow for overloads in C++? If so, then I think this equivalent-up-to-size-and-sign approach will disallow those overloads. Commen

[PATCH] D25731: [analyzer] NumberObjectConversion: Support OSNumber and CFNumberRef.

2016-10-27 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. LGTM. Comment at: test/Analysis/number-object-conversion.m:98 + +#define NULL_INSIDE_MACRO NULL +void test_NULL_inside_macro(NSNumber *p) { This is great! And a good catch. https://reviews.llvm.org/

  1   2   3   4   5   >