Re: [PATCH] D12123: [analyzer] Skip Pre/Post handlers for ObjC calls when receiver is nil.

2015-08-19 Thread Devin Coughlin via cfe-commits
dcoughlin updated the summary for this revision. dcoughlin updated this revision to Diff 32638. dcoughlin added a comment. Update patch to address review comments. I've also updated the CheckerDocumentation checker to document the new ObjCMessageNil callback. This version of the patch also

Re: [PATCH] D12123: [analyzer] Skip Pre/Post handlers for ObjC calls when receiver is nil.

2015-08-19 Thread Devin Coughlin via cfe-commits
dcoughlin marked 5 inline comments as done. Comment at: include/clang/StaticAnalyzer/Core/CheckerManager.h:96 @@ -95,1 +95,3 @@ +enum class ObjCCheckerKind { + PreVisit, xazax.hun wrote: I do not really like the name ObjCCheckerKind, because it is not kind of

Re: [PATCH] D11832: [Patch] [Analyzer] false positive: Potential leak connected with memcpy (PR 22954)

2015-08-13 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. I'm still looking at this. Higher-level comments coming soon. Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1110 @@ +1109,3 @@ + assert(RO.getOffset() = 0 Offset should not be negative); + uint64_t LowerOffset = RO.getOffset(); +

r251218 - [analyzer] scan-build: Teach ccc-analyzer about -Xclang.

2015-10-24 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sat Oct 24 20:30:18 2015 New Revision: 251218 URL: http://llvm.org/viewvc/llvm-project?rev=251218=rev Log: [analyzer] scan-build: Teach ccc-analyzer about -Xclang. Update ccc-analyzer to forward both -Xclang and its following argument to the the compiler driver.

Re: r251524 - [analyzer] Make inclusion/exclusion of checkers less ambiguous.

2015-10-28 Thread Devin Coughlin via cfe-commits
> On Oct 28, 2015, at 9:28 AM, Anton Yartsev via cfe-commits > wrote: > > Author: ayartsev > Date: Wed Oct 28 11:28:57 2015 > New Revision: 251524 > > URL: http://llvm.org/viewvc/llvm-project?rev=251524=rev > Log: > [analyzer] Make inclusion/exclusion of checkers

Re: [PATCH] D14014: Checker of proper vfork usage

2015-10-28 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. LGTM. Can you update the summary to a commit message? Then I will commit. Thanks for upstreaming! http://reviews.llvm.org/D14014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r251312 - [analyzer] ccc-analyzer: Fix -isystem value passing.

2015-10-26 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Oct 26 12:19:51 2015 New Revision: 251312 URL: http://llvm.org/viewvc/llvm-project?rev=251312=rev Log: [analyzer] ccc-analyzer: Fix -isystem value passing. The regex for -isystem matching is broken. -[D,I,Usystem] matches "-D", "-,", "-I", "-U", "-s" "-y", etc.

Re: [PATCH] D13800: ccc-analyzer: Fix -isystem value passing

2015-10-26 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL251312: [analyzer] ccc-analyzer: Fix -isystem value passing. (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D13800?vs=37567=38433#toc Repository: rL LLVM

Re: [PATCH] D14014: Checker of proper vfork usage

2015-10-23 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Hi Yury, Thanks for the patch. This is definitely interesting for upstream! One thing to note (which I assume you are already aware of) is that we already have the "security.insecureAPI.vfork" checker, an AST check that warns on *every* use of vfork. This check is

Re: [PATCH] D14014: Checker of proper vfork usage

2015-10-23 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. > For example, doing 'x = malloc(4); *x = 0;' in the child process seems fine > to me. I don't think this is necessarily safe. For example, malloc() could end up both modifying memory shared between the child and parent process but only modifying process state for

Re: [PATCH] D12358: [Analyzer] Widening loops which do not exit

2015-10-28 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. LGTM. Please commit. Thanks for tackling this, Sean! http://reviews.llvm.org/D12358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D14498: [Analyzer] Fix an assertion caused by r250237 (PR25392)

2015-11-09 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Hi Sean, I just committed a slightly different fix that I already had prepared (r252506). That fix also handles the case when the ThisVal is a loc that can't be converted to a memory region. Thanks for looking into this and my apologies for the duplication of effort!

r252506 - [analyzer] Fix assertion failure invalidating on const member function calls (PR25392).

2015-11-09 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Nov 9 13:50:29 2015 New Revision: 252506 URL: http://llvm.org/viewvc/llvm-project?rev=252506=rev Log: [analyzer] Fix assertion failure invalidating on const member function calls (PR25392). We now return early when the 'this' value cannot be converted to a

r253157 - [analyzer] Refer to capture field to determine if capture is reference.

2015-11-14 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sat Nov 14 21:07:17 2015 New Revision: 253157 URL: http://llvm.org/viewvc/llvm-project?rev=253157=rev Log: [analyzer] Refer to capture field to determine if capture is reference. The analyzer incorrectly treats captures as references if either the original captured

Re: [PATCH] D14736: [analyzer] DeadStoresChecker: Treat locals captured by reference in C++ lambdas as escaped.

2015-11-16 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. This is PR 22834. https://llvm.org/bugs/show_bug.cgi?id=22834. http://reviews.llvm.org/D14736 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r252797 - [analyzer] Fix scan-build to handle missing output directories.

2015-11-11 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Nov 11 14:39:03 2015 New Revision: 252797 URL: http://llvm.org/viewvc/llvm-project?rev=252797=rev Log: [analyzer] Fix scan-build to handle missing output directories. Cwd::abs_path has a somewhat tricky semantics: if it's operand directory does not exist, it'll

Re: [PATCH] D14345: [analyzer] Update SATestBuild.py to enable a 'download and patch' model for projects.

2015-11-04 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. In http://reviews.llvm.org/D14345#281475, @xazax.hun wrote: > Hi! > > I think it is great to support this model in these scripts. Do you plan to > check the list of the project urls in to the repository as well? The project URLs are implicitly included in the

Re: [PATCH] D14303: [analyzer] Add 'optin' checker package and move localizability checkers into it.

2015-11-04 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL252080: [analyzer] Add 'optin' checker package and move localizability checkers into it. (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D14303?vs=39102=39251#toc Repository:

r252080 - [analyzer] Add 'optin' checker package and move localizability checkers into it.

2015-11-04 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Nov 4 15:33:41 2015 New Revision: 252080 URL: http://llvm.org/viewvc/llvm-project?rev=252080=rev Log: [analyzer] Add 'optin' checker package and move localizability checkers into it. This commit creates a new 'optin' top-level checker package and moves several of the

r251966 - [analyzer] Move the ObjCGenericsChecker out of the alpha package.

2015-11-03 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Nov 3 13:38:03 2015 New Revision: 251966 URL: http://llvm.org/viewvc/llvm-project?rev=251966=rev Log: [analyzer] Move the ObjCGenericsChecker out of the alpha package. It is now in the osx.cocoa package and so will be on by default for Apple toolchains. Modified:

[PATCH] D14303: [analyzer] Add 'optin' checker package and move localizability checkers into it.

2015-11-03 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added reviewers: zaks.anna, krememek. dcoughlin added a subscriber: cfe-commits. This patch creates a new 'optin' top-level checker package and moves several of the localizability checkers into it. This package is for checkers that are not alpha and

[PATCH] D14345: [analyzer] Update SATestBuild.py to enable a 'download and patch' model for projects.

2015-11-04 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added reviewers: zaks.anna, krememek. dcoughlin added a subscriber: cfe-commits. Currently the SATestBuild.py and SATestAdd.py buildbot scripts expect project sources to be checked into the project repository. This patch changes these scripts to

Re: [PATCH] D14345: [analyzer] Update SATestBuild.py to enable a 'download and patch' model for projects.

2015-11-07 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL252410: [analyzer] Update SATestBuild.py to enable a 'download and patch' model for… (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D14345?vs=39229=39641#toc Repository:

r252410 - [analyzer] Update SATestBuild.py to enable a 'download and patch' model for projects.

2015-11-07 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sat Nov 7 12:27:35 2015 New Revision: 252410 URL: http://llvm.org/viewvc/llvm-project?rev=252410=rev Log: [analyzer] Update SATestBuild.py to enable a 'download and patch' model for projects. Currently the SATestBuild.py and SATestAdd.py buildbot scripts expect project

Re: [PATCH] D13099: [Analyzer] Don’t invalidate CXXThis when conservatively evaluating const methods (PR 21606)

2015-11-03 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. This patch seems to have caused a regression. https://llvm.org/bugs/show_bug.cgi?id=25392 Repository: rL LLVM http://reviews.llvm.org/D13099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D12358: [Analyzer] Widening loops which do not exit

2015-10-20 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Hi Sean, Sorry it took me so long to get back to you. Comment at: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:266 @@ +265,3 @@ + /// \sa shouldWidenLoops + bool WidenLoops; + Is this field used? Comment

Re: Stage 2 bot failure: clang-stage2-configure-Rlto_check

2015-10-16 Thread Devin Coughlin via cfe-commits
This isn’t just the static analyzer. There are Sema failures here as well: • Clang.Sema.exprs.c • Clang.Sema.shift.c • Clang.Sema.uninit-variables.c • Clang.Sema.warn-unreachable.c • Clang.SemaCXX.runtimediag-ppe.cpp •

Re: [PATCH] D13134: [analyzer] Add keyboard shortcuts to report.html

2015-10-05 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Thanks for the update. Unfortunately, we can't accept the mousetrap code. Any code contributed to clang needs to be under the UIUC license. The original copyright owner would need to contribute the code under that license. I think it would be fine to revert to your

Re: [PATCH] D13488: [analyzer] Assume escape is possible through system functions taking void*

2015-10-06 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. Has a typo but otherwise LGTM. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:258 @@ +257,3 @@ + /// the condition. + bool

Re: [PATCH] D12358: [Analyzer] Widening loops which do not exit

2015-10-13 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. > There is a loss of precision for loops that need to be executed exactly > maxBlockVisitOnPath times, as the loop body is executed with the widened > state instead of the last iteration. I think this is an acceptable loss of precision because, in general, it is

Re: [PATCH] D13099: [Analyzer] Don’t invalidate CXXThis when conservatively evaluating const methods (PR 21606)

2015-10-13 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL250237: [analyzer] Don’t invalidate CXXThis when conservatively evaluating const… (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D13099?vs=37084=37291#toc Repository: rL

Re: [PATCH] D12571: [Analyzer] Fix assertions in commit r246345 (pr22954).

2015-09-08 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:843 @@ +842,3 @@ + if (!Length) +return true; + There doesn't seem to be a test that cares about this returning true (as compared to false).

r247103 - Revert "[Static Analyzer] BugReporter.cpp:2869: Assertion failed: !RemainingNodes.empty() && "No error node found in the trimmed graph""

2015-09-08 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Sep 8 18:50:22 2015 New Revision: 247103 URL: http://llvm.org/viewvc/llvm-project?rev=247103=rev Log: Revert "[Static Analyzer] BugReporter.cpp:2869: Assertion failed: !RemainingNodes.empty() && "No error node found in the trimmed graph"" This is making our internal

Re: [PATCH] D11832: [Patch] [Analyzer] false positive: Potential leak connected with memcpy (PR 22954)

2015-08-25 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Thanks for adding handling of the symbolic cases! Some more comments inline. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:825 @@ -816,1 +824,3 @@ +ProgramStateRef CStringChecker::IsFirstBufInBound(CheckerContext C, +

Re: [PATCH] D12358: [Analyzer] Handling constant bound loops

2015-09-08 Thread Devin Coughlin via cfe-commits
Hi Sean, Ted provided more details off-list. He suspects that the problem is that we likely don't add MemSpaceRegions to the worklist because every region is a subregion of a MemSpaceRegion, and thus we would invalidate, by default, all regions that were in the same MemSpace as the regions we

[PATCH] D12769: [analyzer] Update SATestBuild.py to set -isysroot for preprocessed files

2015-09-10 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added reviewers: zaks.anna, xazax.hun. dcoughlin added a subscriber: cfe-commits. Update the static analyzer buildbot script to set -isysroot to the OS X SDK path when analyzing preprocessed files. http://reviews.llvm.org/D12769 Files:

Re: [PATCH] D12769: [analyzer] Update SATestBuild.py to set -isysroot for preprocessed files

2015-09-10 Thread Devin Coughlin via cfe-commits
dcoughlin updated this revision to Diff 34471. dcoughlin added a comment. Pass -cc1 to clang even when SDK path is not found. http://reviews.llvm.org/D12769 Files: utils/analyzer/SATestBuild.py Index: utils/analyzer/SATestBuild.py

Re: [PATCH] D12769: [analyzer] Update SATestBuild.py to set -isysroot for preprocessed files

2015-09-10 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: utils/analyzer/SATestBuild.py:277 @@ +276,3 @@ +# For now, we assume the preprocessed files should be analyzed +# with the OS X SDK. +SDKPath = getSDKPath("macosx") xazax.hun wrote: > I think it might be

Re: [PATCH] D12358: [Analyzer] Handling constant bound loops

2015-09-12 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. I looked at the behavior of invalidateRegions() under the patch. It looks like MemSpaceRegions //are// being added to the worklist but these regions don't have clusters associated with them so invalidating the regions themselves doesn't remove any bindings. Ted:

r247767 - [analyzer] SATestBuild.py: Move additional checkers logic so SATestAdd.py can use it as well.

2015-09-15 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Sep 15 20:52:32 2015 New Revision: 247767 URL: http://llvm.org/viewvc/llvm-project?rev=247767=rev Log: [analyzer] SATestBuild.py: Move additional checkers logic so SATestAdd.py can use it as well. Move the logic looking for additional checkers in the

Re: [PATCH] D12891: [analyzer] SATestBuild.py: Move additional checkers logic so SATestAdd.py can use it as well.

2015-09-15 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL247767: [analyzer] SATestBuild.py: Move additional checkers logic so SATestAdd.py can… (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D12891?vs=34853=34864#toc Repository:

[PATCH] D12891: [analyzer] SATestBuild.py: Move additional checkers logic so SATestAdd.py can use it as well.

2015-09-15 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added reviewers: xazax.hun, zaks.anna. dcoughlin added a subscriber: cfe-commits. Move the logic looking for additional checkers in the SA_ADDITIONAL_CHECKERS environmental variable from SATestBuild's main() to runScanBuild(). This allows SATestAdd.py

Re: [PATCH] D12406: [Analyzer] Add -analyzer-config option for function size the inliner considers as large

2015-09-11 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL247463: [analyzer] Add -analyzer-config option for function size the inliner… (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D12406?vs=34196=34574#toc Repository: rL LLVM

r247653 - [analyzer] Skip Pre/Post handlers for ObjC calls when receiver is nil.

2015-09-14 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Sep 14 20:13:53 2015 New Revision: 247653 URL: http://llvm.org/viewvc/llvm-project?rev=247653=rev Log: [analyzer] Skip Pre/Post handlers for ObjC calls when receiver is nil. In Objective-C, method calls with nil receivers are essentially no-ops. They do not fault

Re: [PATCH] D12123: [analyzer] Skip Pre/Post handlers for ObjC calls when receiver is nil.

2015-09-14 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL247653: [analyzer] Skip Pre/Post handlers for ObjC calls when receiver is nil. (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D12123?vs=33836=34772#toc Repository: rL LLVM

r247660 - [analyzer] Restore behavior change introduced by r247657.

2015-09-14 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Sep 14 22:28:27 2015 New Revision: 247660 URL: http://llvm.org/viewvc/llvm-project?rev=247660=rev Log: [analyzer] Restore behavior change introduced by r247657. r247657 fixed warnings about unused variables when compiling without asserts but changed behavior. This

Re: [PATCH] D12780: [analyzer] Add generateErrorNode() APIs to CheckerContext

2015-09-16 Thread Devin Coughlin via cfe-commits
dcoughlin updated this revision to Diff 34917. dcoughlin added a comment. Added checks for null generated error nodes in the few cases in checkers were they were missing and updated comments. http://reviews.llvm.org/D12780 Files:

r247859 - [analyzer] Add generateErrorNode() APIs to CheckerContext.

2015-09-16 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Sep 16 17:03:05 2015 New Revision: 247859 URL: http://llvm.org/viewvc/llvm-project?rev=247859=rev Log: [analyzer] Add generateErrorNode() APIs to CheckerContext. The analyzer trims unnecessary nodes from the exploded graph before reporting path diagnostics. However,

Re: [PATCH] D12780: [analyzer] Add generateErrorNode() APIs to CheckerContext

2015-09-16 Thread Devin Coughlin via cfe-commits
> On Sep 16, 2015, at 4:01 PM, NAKAMURA Takumi wrote: > > Did you forget to update examples/analyzer-plugin? Fixed in r247862. Yes — thank you! Devin ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D12780: [analyzer] Add generateErrorNode() APIs to CheckerContext

2015-09-16 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h:321 @@ +320,3 @@ +// sink, we assume that a client requesting a transition to a state that is +// the same as the predecessor state has made a mistake. We return

Re: [PATCH] D12571: [Analyzer] Fix assertions in commit r246345 (pr22954).

2015-09-17 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:198 @@ +197,3 @@ + + // Return true if the destination buffer of the copy function must/may be in + // bound. Since this returns true on unknown, it should be "may".

Re: [PATCH] D12571: [Analyzer] Fix assertions in commit r246345 (pr22954).

2015-09-17 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Here is a reduced test case: class B { public: B = (const B ) { return *this; } }; class A { int a[1]; B b; }; typedef long int ptrdiff_t; void copyInto(A *first, A *last, A *result) { ptrdiff_t n; for (n = last

Re: [PATCH] D12358: [Analyzer] Handling constant bound loops

2015-09-11 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. I'll look at this today. Thanks for your patience! http://reviews.llvm.org/D12358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12251: Analyzer: Calculate field offset correctly

2015-09-30 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: test/Analysis/array-struct-region.cpp:128 @@ +127,3 @@ +#if __cplusplus + clang_analyzer_eval((void *)>secondField != (void *)); // expected-warning{{TRUE}} +#endif ismailp wrote: > I might be missing something, and

Re: [PATCH] D13134: [analyzer] Add keyboard shortcuts to report.html

2015-09-29 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Thanks for the patch! This looks very useful. What browsers does the JavaScript support? One thing I noticed is that after immediately loading a new report page the 'j' and 'k' shortcuts don't work for me. In Safari, I get: TypeError: null is not an object

Re: [PATCH] D12993: [analyzer] Add TK_EntireMemSpace invalidation trait.

2015-10-01 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL249063: [analyzer] Add TK_EntireMemSpace invalidation trait. (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D12993?vs=35170=36288#toc Repository: rL LLVM

Re: [PATCH] D12358: [Analyzer] Handling constant bound loops

2015-09-21 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Core/LoopWidening.cpp:149 @@ +148,3 @@ + break; +} + This doesn't seem quite right. Consider: ``` int i; for (i = 0; i < 21; i += 3) {} clang_analyzer_eval(i == 23); ``` The value of `i`

Re: [PATCH] D5102: [analyzer][Bugfix/improvement] Fix for PR16833

2015-09-22 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. I will commit. Thanks! http://reviews.llvm.org/D5102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r248318 - [analyzer] Create one state for a range switch case instead of multiple.

2015-09-22 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Sep 22 15:31:19 2015 New Revision: 248318 URL: http://llvm.org/viewvc/llvm-project?rev=248318=rev Log: [analyzer] Create one state for a range switch case instead of multiple. This fixes PR16833, in which the analyzer was using large amounts of memory for switch

Re: [PATCH] D9040: [analyzer] Make realloc(ptr, 0) handling equivalent to malloc(0).

2015-09-22 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL248336: [analyzer] Make realloc(ptr, 0) handling equivalent to malloc(0). (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D9040?vs=34583=35432#toc Repository: rL LLVM

r248336 - [analyzer] Make realloc(ptr, 0) handling equivalent to malloc(0).

2015-09-22 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Sep 22 17:47:14 2015 New Revision: 248336 URL: http://llvm.org/viewvc/llvm-project?rev=248336=rev Log: [analyzer] Make realloc(ptr, 0) handling equivalent to malloc(0). Currently realloc(ptr, 0) is treated as free() which seems to be not correct. C standard (N1570)

Re: [PATCH] D9924: Ignore report when the argument to malloc is assigned known value

2015-09-22 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Aditya, can you update the patch title and summary to a commit message so I can commit it? Thanks! http://reviews.llvm.org/D9924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D12417: Improvements to localizability checks for iOS / OS X

2015-09-22 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL248350: [analyzer] Improve localizability checks for iOS / OS X. (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D12417?vs=35404=35445#toc Repository: rL LLVM

Re: [PATCH] D12417: Improvements to localizability checks for iOS / OS X

2015-09-22 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. This is causing tests to fail on the bots: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/31373 /home/llvmbb/llvm-build-dir/clang-x86_64-debian-fast/llvm.obj/Release+Asserts/bin/clang -cc1 -internal-isystem

r248350 - [analyzer] Improve localizability checks for iOS / OS X.

2015-09-22 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Sep 22 18:58:04 2015 New Revision: 248350 URL: http://llvm.org/viewvc/llvm-project?rev=248350=rev Log: [analyzer] Improve localizability checks for iOS / OS X. Various improvements to the localization checker: * Adjusted copy to be consistent with diagnostic text in

r248351 - Revert "[analyzer] Improve localizability checks for iOS / OS X."

2015-09-22 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Sep 22 19:17:52 2015 New Revision: 248351 URL: http://llvm.org/viewvc/llvm-project?rev=248351=rev Log: Revert "[analyzer] Improve localizability checks for iOS / OS X." This reverts commit r248350. The pluralization checks are failing on some bots. Modified:

r248516 - [analyzer] When memcpy'ing into a fixed-size array, do not invalidate entire region.

2015-09-24 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Sep 24 11:52:56 2015 New Revision: 248516 URL: http://llvm.org/viewvc/llvm-project?rev=248516=rev Log: [analyzer] When memcpy'ing into a fixed-size array, do not invalidate entire region. Change the analyzer's modeling of memcpy to be more precise when copying into

Re: [PATCH] D12571: [Analyzer] Fix assertions in commit r246345 (pr22954).

2015-09-24 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL248516: [analyzer] When memcpy'ing into a fixed-size array, do not invalidate entire… (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D12571?vs=35505=35644#toc Repository:

Re: [PATCH] D12251: Analyzer: Calculate field offset correctly

2015-09-25 Thread Devin Coughlin via cfe-commits
dcoughlin requested changes to this revision. dcoughlin added a comment. This revision now requires changes to proceed. Thanks for the patch Ismail! Some comments inline. Comment at: lib/StaticAnalyzer/Core/Store.cpp:408 @@ +407,3 @@ +if (!Base.isZeroConstant()) { + if

Re: [PATCH] D12482: Analyzer: Teach analyzer how to handle TypeTraitExpr

2015-09-21 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. You should add a test covering the added logic in SValBuilder. For example: clang_analyzer_eval(__is_trivial(NonTrivial)); // expected-warning {{FALSE}} And while we're at it, it would be good to add a test for UnaryExprOrTypeTraitExpr as well:

[PATCH] D12993: [analyzer] Add TK_EntireMemSpace invalidation trait.

2015-09-19 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added reviewers: krememek, zaks.anna. dcoughlin added subscribers: cfe-commits, seaneveson. This is a patch to support Sean Eveson's work on loop widening. It adds a new TK_EntireMemSpace invalidation trait that, when applied to a MemSpaceRegion,

Re: [PATCH] D12358: [Analyzer] Handling constant bound loops

2015-09-19 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. There is a patch to add memspace region invalidation in http://reviews.llvm.org/D12993. http://reviews.llvm.org/D12358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D12482: Analyzer: Teach analyzer how to handle TypeTraitExpr

2015-09-21 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Ismail, is 24710 the right bug? It is "clang-tidy segfaults with relative include paths". https://llvm.org/bugs/show_bug.cgi?id=24710 http://reviews.llvm.org/D12482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r248432 - [analyzer] Improve localizability checks for iOS / OS X.

2015-09-23 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Sep 23 16:43:21 2015 New Revision: 248432 URL: http://llvm.org/viewvc/llvm-project?rev=248432=rev Log: [analyzer] Improve localizability checks for iOS / OS X. Various improvements to the localization checker: * Adjusted copy to be consistent with diagnostic text in

Re: r248458 - clang/test/Analysis/malloc-overflow2.c: Appease 32-bit targets.

2015-09-23 Thread Devin Coughlin via cfe-commits
Thanks for fixing this! Devin > On Sep 23, 2015, at 7:49 PM, NAKAMURA Takumi via cfe-commits > wrote: > > Author: chapuni > Date: Wed Sep 23 21:49:00 2015 > New Revision: 248458 > > URL: http://llvm.org/viewvc/llvm-project?rev=248458=rev > Log: >

Re: [PATCH] D9924: Discard malloc-overflow bug-report when a known size is malloc'ed.

2015-09-23 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL248446: [analyzer] Discard malloc-overflow bug-report when a known size is malloc'ed. (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D9924?vs=35461=35572#toc Repository:

Re: [PATCH] D12571: [Analyzer] Fix assertions in commit r246345 (pr22954).

2015-09-23 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. Looks good to me! Thanks Pierre! I will commit. http://reviews.llvm.org/D12571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D11832: [Patch] [Analyzer] false positive: Potential leak connected with memcpy (PR 22954)

2015-08-28 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL246345: [analyzer] When memcpy'ing into a fixed-size array, do not invalidate entire… (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D11832?vs=33402id=33478#toc Repository:

r246345 - [analyzer] When memcpy'ing into a fixed-size array, do not invalidate entire region.

2015-08-28 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Aug 28 17:26:05 2015 New Revision: 246345 URL: http://llvm.org/viewvc/llvm-project?rev=246345view=rev Log: [analyzer] When memcpy'ing into a fixed-size array, do not invalidate entire region. Change the analyzer's modeling of memcpy to be more precise when copying

Re: [PATCH] D11832: [Patch] [Analyzer] false positive: Potential leak connected with memcpy (PR 22954)

2015-08-28 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. I will commit. Thanks for your work on this, Pierre! http://reviews.llvm.org/D11832 ___ cfe-commits mailing list

Re: [PATCH] D6551: Improvements to scan-build.

2015-08-28 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. I ran our build-bot scripts with this and it looks good to me, although I've noted two places with trailing whitespace. Thanks for your patience! Comment at: tools/scan-build/scan-build:1403 @@ +1402,3 @@ + my $Args

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=rev > Log: > Fix an unused variable warning in

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=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: [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

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=rev Log: [analyzer] Fix MemRegion crash casting non-struct to derived struct (PR25426). This commit prevents MemRegion::getAsOffset() from crashing when the analyzed program

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

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

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=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 size

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

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

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=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

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

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

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(_env); rizsotto.mailinglist wrote: > rizsotto.mailinglist wrote: > > to run the full test set >

r256567 - [analyzer] Nullability: allow cast to _Nonnull to suppress warning about returning nil.

2015-12-29 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Dec 29 11:40:49 2015 New Revision: 256567 URL: http://llvm.org/viewvc/llvm-project?rev=256567=rev Log: [analyzer] Nullability: allow cast to _Nonnull to suppress warning about returning nil. The nullability checker currently allows casts to suppress warnings when a

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

2016-01-06 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Hi Laszlo, I've run scan-build-py with both environment-variable-based and library-based interposition on our open source benchmark suite and it looks like it is in great shape on Darwin! There are still some remaining issues with xcodebuild, but I will help fix

Re: [PATCH] D5023: [analyzer] Fix ObjC Dealloc Checker to operate only on classes with retained properties

2016-01-07 Thread Devin Coughlin via cfe-commits
dcoughlin commandeered this revision. dcoughlin edited reviewers, added: ddkilzer; removed: dcoughlin. dcoughlin added a comment. I am commandeering this revision! http://reviews.llvm.org/D5023 ___ cfe-commits mailing list

r256605 - [analyzer] Handle another Android assert function.

2015-12-29 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Dec 29 18:08:59 2015 New Revision: 256605 URL: http://llvm.org/viewvc/llvm-project?rev=256605=rev Log: [analyzer] Handle another Android assert function. Android's assert can call both the __assert and __assert2 functions under the cover, but the

r256603 - [analyzer] Suppress nullability warning for _Nonnull locals zero-initialized by ObjC ARC.

2015-12-29 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Dec 29 17:44:19 2015 New Revision: 256603 URL: http://llvm.org/viewvc/llvm-project?rev=256603=rev Log: [analyzer] Suppress nullability warning for _Nonnull locals zero-initialized by ObjC ARC. Prevent the analyzer from warning when a _Nonnnull local variable is

Re: [PATCH] D15794: CheckerContext::isCLibraryFunction(): small refactoring; NFC

2015-12-28 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. LGTM. I'll commit. Thanks Aleksei! Repository: rL LLVM http://reviews.llvm.org/D15794 ___ cfe-commits mailing list

  1   2   3   4   >