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

2015-10-25 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. I will commit. http://reviews.llvm.org/D13800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

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&view=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. Be

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&id=38433#toc Repository: rL LLVM http://reviews

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&view=rev > Log: > [analyzer] Make inclusion/exclusion of checkers less ambiguous. ... > >

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 http://lists.llvm.org/cgi-bin/mailma

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 http://lists.llvm.org/cgi-bin/mailman/listinfo/c

r251591 - [analyzer] Update analyzer website for release of checker-277.

2015-10-28 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Oct 28 20:23:57 2015 New Revision: 251591 URL: http://llvm.org/viewvc/llvm-project?rev=251591&view=rev Log: [analyzer] Update analyzer website for release of checker-277. Modified: cfe/trunk/www/analyzer/index.html cfe/trunk/www/analyzer/installation.html c

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

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 http://lists.llvm.org

[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 th

[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 additiona

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

2015-11-04 Thread Devin Coughlin via cfe-commits
dcoughlin marked an inline comment as done. dcoughlin added a comment. http://reviews.llvm.org/D14303 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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&id=39251#toc Repositor

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 downloa

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&view=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 proj

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&id=39641#toc Repository:

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&view=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 MemRe

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!

Re: [PATCH] D14203: [analyzer] Improve pointer arithmetic checker.

2015-11-11 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Gabor, This is an alpha checker. Do you anticipate turning it on by default? Comments inline. Comment at: lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp:28 @@ -24,1 +27,3 @@ namespace { +enum class AllocKind { + SingletonNew,

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&view=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 r

[PATCH] D11842: [analyzer]Don't issue alarm in ObjCSuperCallChecker for the super class itself.

2015-08-07 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added reviewers: zaks.anna, jordan_rose, xazax.hun. dcoughlin added a subscriber: cfe-commits. Herald added subscribers: rengolin, aemerson. The ObjCSuperCallChecker issues alarms for various Objective-C APIs that require a subclass to call to its supercl

r244386 - [analyzer] Don't issue alarm in ObjCSuperCallChecker for the super class itself.

2015-08-07 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Aug 7 20:31:51 2015 New Revision: 244386 URL: http://llvm.org/viewvc/llvm-project?rev=244386&view=rev Log: [analyzer] Don't issue alarm in ObjCSuperCallChecker for the super class itself. The ObjCSuperCallChecker issues alarms for various Objective-C APIs that require

Re: [PATCH] D10225: [Static Analyzer] Remove ObjCContainersChecker size information when a CFMutableArrayRef escapes

2015-08-07 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. This was committed in r239709. http://reviews.llvm.org/D10225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r275820 - [analyzer] Add checker modeling potential C++ self-assignment

2016-07-18 Thread Devin Coughlin via cfe-commits
ds/40225/ > > I'm just about to create the 3.9 release branch, so it would be great > if this could fixed/figured out soon. > > Thanks, > Hans > > On Mon, Jul 18, 2016 at 10:23 AM, Devin Coughlin via cfe-commits > wrote: >> Author: dcoughlin >> Dat

r275880 - Revert "[analyzer] Add checker modeling potential C++ self-assignment"

2016-07-18 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Jul 18 13:57:50 2016 New Revision: 275880 URL: http://llvm.org/viewvc/llvm-project?rev=275880&view=rev Log: Revert "[analyzer] Add checker modeling potential C++ self-assignment" This reverts commit r275820. It is failing on the bots. Removed: cfe/trunk/lib/Static

Re: r275820 - [analyzer] Add checker modeling potential C++ self-assignment

2016-07-18 Thread Devin Coughlin via cfe-commits
> On Jul 18, 2016, at 10:50 AM, Hans Wennborg wrote: >> >> It seems to have broken this buildbot: >> http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/40225/ >> >> I'm just about to create the 3.9 release branch, so it would be great >> if this could f

Re: [PATCH] D19311: [analyzer] Self Assignment Checker

2016-07-18 Thread Devin Coughlin via cfe-commits
dcoughlin reopened this revision. dcoughlin added a comment. This revision is now accepted and ready to land. Re-opening. Reverted in r275880. It was causing a failure on the bots: http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/51780 Repository: rL LLVM https://reviews.llvm.org/D1

Re: [PATCH] D19311: [analyzer] Self Assignment Checker

2016-07-20 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Here is the failing test output in case the bot log goes away: - TEST 'Clang :: Analysis/self-assign.cpp' FAILED Script: --- /home/bb/cmake-clang-x86_64-linux/build/./bin/clang -cc1 -internal-isystem /home/bb/cmake-clang-x86_64-linux/build/bi

Re: [PATCH] D19311: [analyzer] Self Assignment Checker

2016-07-21 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL276365: [analyzer] Add checker modeling potential C++ self-assignment (authored by dcoughlin). Changed prior to commit: https://reviews.llvm.org/D19311?vs=64864&id=64996#toc Repository: rL LLVM http

r276365 - [analyzer] Add checker modeling potential C++ self-assignment

2016-07-21 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Jul 21 18:42:31 2016 New Revision: 276365 URL: http://llvm.org/viewvc/llvm-project?rev=276365&view=rev Log: [analyzer] Add checker modeling potential C++ self-assignment This checker checks copy and move assignment operators whether they are protected against self-assi

Re: [PATCH] D22419: [CFG] Fix crash in thread sanitizer.

2016-07-23 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. This is https://llvm.org/bugs/show_bug.cgi?id=28666 https://reviews.llvm.org/D22419 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22856: [analyzer] Change -analyze-function to accept qualified names.

2016-07-27 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. I think it would be better for fully-qualified Objective-C methods to be specified with their Objective-C-style names. For example: "-[Test1 myMethodWithY:withX:]". This would also remove the ambiguity when there are class and instance methods with the same selector.

Re: [PATCH] D22856: [analyzer] Change -analyze-function to accept qualified names.

2016-07-27 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D22856#497796, @NoQ wrote: > > I think it would be better for fully-qualified Objective-C methods to be > > specified with their Objective-C-style names. For example: "-[Test1 > > myMethodWithY:withX:]". > > > Uhm, need to know more about t

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

2016-07-27 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:509 @@ +508,3 @@ + //} + // } + //} I disagree about compactness being valuable here. I think it is more important to intrinsically document the spec.

r276950 - [analyzer] Add check::BeginFunction to CheckerDocumentation checks. NFC.

2016-07-27 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Jul 27 19:52:10 2016 New Revision: 276950 URL: http://llvm.org/viewvc/llvm-project?rev=276950&view=rev Log: [analyzer] Add check::BeginFunction to CheckerDocumentation checks. NFC. This was an oversight from when I added BeginFunction support in r261293. Modified:

r277009 - [analyzer] Fix misleading indentation in ObjCDeallocChecker. NFC.

2016-07-28 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Jul 28 12:18:33 2016 New Revision: 277009 URL: http://llvm.org/viewvc/llvm-project?rev=277009&view=rev Log: [analyzer] Fix misleading indentation in ObjCDeallocChecker. NFC. Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp Modified: cfe/trunk/l

Re: [PATCH] D22926: Static Analyzer - Localizability Checker: New Localizable APIs for macOS Sierra

2016-07-28 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. This doesn't compile for me. It looks like there are two separate declarations of 'buttonWithTitleNSButton'. https://reviews.llvm.org/D22926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

Re: [PATCH] D22862: [analyzer] Fix for PR15623: eliminate unwanted ProgramState checker data propagation.

2016-07-29 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. As PR15623 shows, returning the existing cast is not correct. But rather than replace it with an unknown, here is a proposal for how to address this without regressing in precision. Instead of using `assumeDual()` in `ExprEngine::VisitLogicalExpr()` on the `RHSVal` a

r277273 - [analyzer] Update APIs taking user-facing strings.

2016-07-30 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sat Jul 30 11:16:51 2016 New Revision: 277273 URL: http://llvm.org/viewvc/llvm-project?rev=277273&view=rev Log: [analyzer] Update APIs taking user-facing strings. Add new APIs that require localized strings and remove two APIs that were incorrectly marked as requiring a us

Re: [PATCH] D22926: Static Analyzer - Localizability Checker: New Localizable APIs for macOS Sierra

2016-07-30 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL277273: [analyzer] Update APIs taking user-facing strings. (authored by dcoughlin). Changed prior to commit: https://reviews.llvm.org/D22926?vs=66006&id=66225#toc Repository: rL LLVM https://reviews

Re: [PATCH] D15227: [analyzer] Valist checkers.

2016-08-01 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/ValistChecker.cpp:177 @@ +176,3 @@ + if (ExplodedNode *N = C.addTransition(State)) +reportLeakedVALists(LeakedVALists, "Initialized va_list", " is leaked", C, +N); ---

Re: [PATCH] D23003: [ObjC Availability] Warn upon unguarded use of partially available declaration

2016-08-01 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. It's really great to see this! Comment at: lib/Sema/SemaExpr.cpp:15200 @@ -15182,2 +15199,3 @@ // platform. -Diag(AtLoc, diag::warn_available_using_star_case) << RParen << Platform; +Diag(AtLoc, diag::warn_available_using_star_case) +

Re: [PATCH] D23014: [analyzer] Model base to derived casts more precisely.

2016-08-02 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Other than a naming/documentation suggestion, looks good to me. Thanks Gábor! Comment at: lib/StaticAnalyzer/Core/ExprEngineC.cpp:424 @@ +423,3 @@ +if (!val.isZeroConstant()) { + val = getStoreManager().evalDynamicCast(val, T, Failed);

Re: [PATCH] D23003: [ObjC Availability] Warn upon unguarded use of partially available declaration

2016-08-02 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:6611 @@ +6610,3 @@ + if (auto *E = dyn_cast(If->getCond())) { +// If we're using the '*' case here, then we cannot emit any warnings for +// the 'then' branch. Do you still want to sup

Re: [PATCH] D22419: [CFG] Fix crash in thread sanitizer.

2016-08-02 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 will commit. Thanks Nandor! https://reviews.llvm.org/D22419 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

r277522 - [CFG] Fix crash finding destructor of lifetime-extended temporary.

2016-08-02 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Aug 2 16:07:23 2016 New Revision: 277522 URL: http://llvm.org/viewvc/llvm-project?rev=277522&view=rev Log: [CFG] Fix crash finding destructor of lifetime-extended temporary. Fix a crash under -Wthread-safety when finding the destructor for a lifetime-extending referen

Re: [PATCH] D22419: [CFG] Fix crash in thread sanitizer.

2016-08-02 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL277522: [CFG] Fix crash finding destructor of lifetime-extended temporary. (authored by dcoughlin). Changed prior to commit: https://reviews.llvm.org/D22419?vs=65545&id=66554#toc Repository: rL LLVM

Re: [PATCH] D18073: Add memory allocating functions

2016-08-02 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D18073#437171, @ariccio wrote: > I should elaborate. The principle of operation of this latest patch is that > the `FunctionDecl` in `IsCMemFunction` should never return a `nullptr` > `IdentifierInfo*` from `getIdentifier` (is that a valid

Re: [PATCH] D22670: MPI-Checker fix two comments

2016-08-02 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL277547: [analyzer] Update two comments in MPI-Checker. NFC. (authored by dcoughlin). Changed prior to commit: https://reviews.llvm.org/D22670?vs=65047&id=66594#toc Repository: rL LLVM https://review

r277547 - [analyzer] Update two comments in MPI-Checker. NFC.

2016-08-02 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Aug 2 18:24:40 2016 New Revision: 277547 URL: http://llvm.org/viewvc/llvm-project?rev=277547&view=rev Log: [analyzer] Update two comments in MPI-Checker. NFC. Correct two comments that do not match the current behavior of the checker. A patch by Alexander Droste! Di

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-08-08 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: test/Analysis/nullability.mm:114 @@ -112,1 +113,3 @@ +NSString *_Nonnull testNullReturnInTernaryOperator(int x) { +return x > 3 ? nil : [@"" stringByAppendingString:@""]; // expected-warning {{Null is returned from a function tha

r278382 - [analyzer] Teach RetainCountChecker about CVFooRetain

2016-08-11 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Aug 11 13:41:29 2016 New Revision: 278382 URL: http://llvm.org/viewvc/llvm-project?rev=278382&view=rev Log: [analyzer] Teach RetainCountChecker about CVFooRetain Change the retain count checker to treat CoreFoundation-style "CV"-prefixed reference types from CoreVideo

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

2016-08-12 Thread Devin Coughlin via cfe-commits
dcoughlin commandeered this revision. dcoughlin edited reviewers, added: andrewmw94; removed: dcoughlin. dcoughlin added a comment. Thanks for the patches! I've commandeered this revision to be able to update the diff to merge the two patch files into one. You should commandeer it back by using

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

2016-08-12 Thread Devin Coughlin via cfe-commits
dcoughlin removed rL LLVM as the repository for this revision. dcoughlin updated this revision to Diff 67862. dcoughlin added a comment. Merge the two patches into one diff. https://reviews.llvm.org/D23375 Files: lib/StaticAnalyzer/Checkers/MallocChecker.cpp test/Analysis/kmalloc-linux.c I

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

2016-08-12 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:593 @@ -590,1 +592,3 @@ + if (FunI == II_free || FunI == II_realloc || + FunI == II_reallocf || FunI == II_kfree) return true; It looks like you are us

Re: [PATCH] D16873: Refactor MemRegionManager::getVarRegion to call two new functions, improving readability

2016-02-04 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. I guess this is a reasonable refactoring. Although someone with different tastes might come along and inline it back in since the two extracted functions each only have single callers. Comment at: llvm/tools/clang/include/clang/StaticAnalyzer/Core/P

r259875 - [analyzer] Suppress localization diagnostics in debug classes and methods.

2016-02-04 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Feb 4 22:22:15 2016 New Revision: 259875 URL: http://llvm.org/viewvc/llvm-project?rev=259875&view=rev Log: [analyzer] Suppress localization diagnostics in debug classes and methods. If the class or method name case-insensitively contains the term "debug", suppress war

r259967 - [www] Update analyzer website for checker-278.

2016-02-05 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Feb 5 18:53:33 2016 New Revision: 259967 URL: http://llvm.org/viewvc/llvm-project?rev=259967&view=rev Log: [www] Update analyzer website for checker-278. Modified: cfe/trunk/www/analyzer/latest_checker.html.incl cfe/trunk/www/analyzer/release_notes.html Modif

r259969 - [www] Update analyzer release notes to correct the checker-278 build date.

2016-02-05 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Feb 5 18:59:14 2016 New Revision: 259969 URL: http://llvm.org/viewvc/llvm-project?rev=259969&view=rev Log: [www] Update analyzer release notes to correct the checker-278 build date. This is not the future. Modified: cfe/trunk/www/analyzer/release_notes.html Modi

r259998 - [analyzer] DeallocChecker: Don't warn on release of readonly assign property in dealloc.

2016-02-06 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sat Feb 6 11:17:32 2016 New Revision: 259998 URL: http://llvm.org/viewvc/llvm-project?rev=259998&view=rev Log: [analyzer] DeallocChecker: Don't warn on release of readonly assign property in dealloc. It is common for the ivars for read-only assign properties to always be

r260043 - [analyzer] Invalidate destination of std::copy() and std::copy_backward().

2016-02-07 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sun Feb 7 10:55:44 2016 New Revision: 260043 URL: http://llvm.org/viewvc/llvm-project?rev=260043&view=rev Log: [analyzer] Invalidate destination of std::copy() and std::copy_backward(). Now that the libcpp implementations of these methods has a branch that doesn't call m

r260066 - [analyzer] Avoid crash when attempting to evaluate binary operation on LazyCompoundVal.

2016-02-07 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sun Feb 7 18:28:24 2016 New Revision: 260066 URL: http://llvm.org/viewvc/llvm-project?rev=260066&view=rev Log: [analyzer] Avoid crash when attempting to evaluate binary operation on LazyCompoundVal. Instead, return UnknownValue if either operand is a nonloc::LazyCompound

Re: [PATCH] D16873: Refactor MemRegionManager::getVarRegion to call two new functions, improving readability

2016-02-07 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. I think Aleksei is right and I was wrong. If you follow his advice and move the call to getStackOrCaptureRegionForDeclContext() to getVarRegion() and then pass the StackFrameContext to what you currently name "getMemRegionStaticLocal" then both methods have the very

Re: [PATCH] D5238: [analyzer] Detect duplicate [super dealloc] calls

2016-02-09 Thread Devin Coughlin via cfe-commits
dcoughlin updated this revision to Diff 47412. dcoughlin added a comment. Updated this to address Anna's comments. - I've made the state smaller. It is just now a set of SymbolRefs for methods instances that have been dealloc'd. - I've hoisted isSuperDeallocMessage() to early return when possibl

Re: [PATCH] D5238: [analyzer] Detect duplicate [super dealloc] calls

2016-02-10 Thread Devin Coughlin via cfe-commits
dcoughlin updated this revision to Diff 47514. dcoughlin added a comment. Address more of Anna's comments. - Add a more explicit comment about checker in header comment - Changed the checker to always use the receiver symbol rather than the self symbol for clarity. - Rework SuperDeallocBRVisitor

Re: [PATCH] D5238: [analyzer] Detect duplicate [super dealloc] calls

2016-02-10 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. In http://reviews.llvm.org/D5238#348199, @zaks.anna wrote: > Looks good, below are some comments which are mostly nits. > > What's the plan for bringing this out of alpha? Is it pending evaluation on > real code? I will first extend this checker to check for uses of

r260608 - [analyzer] Improve pattern matching in ObjCDealloc checker.

2016-02-11 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Feb 11 16:13:20 2016 New Revision: 260608 URL: http://llvm.org/viewvc/llvm-project?rev=260608&view=rev Log: [analyzer] Improve pattern matching in ObjCDealloc checker. Look through PseudoObjectExpr and OpaqueValueExprs when scanning for release-like operations. This co

r261243 - [analyzer] Improve modeling of ObjC synthesized property setters.

2016-02-18 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Feb 18 13:13:30 2016 New Revision: 261243 URL: http://llvm.org/viewvc/llvm-project?rev=261243&view=rev Log: [analyzer] Improve modeling of ObjC synthesized property setters. When modeling a call to a setter for a property that is synthesized to be backed by an instance

r261248 - [analyzer] Include comment mistakenly left out of r261243. NFC.

2016-02-18 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Feb 18 13:37:39 2016 New Revision: 261248 URL: http://llvm.org/viewvc/llvm-project?rev=261248&view=rev Log: [analyzer] Include comment mistakenly left out of r261243. NFC. It explains why we can't just synthesize bodies of setters in BodyFarm. Modified: cfe/trunk/

[PATCH] D17418: [analyzer] Add checker callback for beginning of function.

2016-02-18 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added a reviewer: zaks.anna. dcoughlin added a subscriber: cfe-commits. Add a checker callback that is called when the analyzer starts analyzing a function either at the top level or when inlined. This will be used by a follow-on patch making the DeallocC

Re: [PATCH] D17418: [analyzer] Add checker callback for beginning of function.

2016-02-18 Thread Devin Coughlin via cfe-commits
dcoughlin marked an inline comment as done. dcoughlin added a comment. http://reviews.llvm.org/D17418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r261293 - [analyzer] Add checker callback for beginning of function.

2016-02-18 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Feb 18 19:35:10 2016 New Revision: 261293 URL: http://llvm.org/viewvc/llvm-project?rev=261293&view=rev Log: [analyzer] Add checker callback for beginning of function. Add a checker callback that is called when the analyzer starts analyzing a function either at the top

Re: [PATCH] D17418: [analyzer] Add checker callback for beginning of function.

2016-02-18 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261293: [analyzer] Add checker callback for beginning of function. (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D17418?vs=48406&id=48438#toc Repository: rL LLVM http://r

Re: [PATCH] D5238: [analyzer] Detect duplicate [super dealloc] calls

2016-02-18 Thread Devin Coughlin via cfe-commits
dcoughlin updated this revision to Diff 48447. dcoughlin added a comment. Addressed additional comments from Anna offline: - "[super dealloc] called again" is OK as a path note but not good as an error message. I've changed it to "[super dealloc] should not be called multiple times". - Added a

Re: [PATCH] D16317: [Analyzer] Fix for PR23790: bind real value returned from strcmp when modelling strcmp.

2016-02-22 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. Looks great, other than some non-standard indentation. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:1886 @@ +1885,3 @@ + svalBuilder.evalBinOp(sta

Re: [PATCH] D14203: [analyzer] Improve pointer arithmetic checker.

2016-02-22 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. Other than a suggested diagnostic rewording to consider, looks good to me. Thanks Gábor! Comment at: lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp:198 @@ +197,3 @

r261545 - [analyzer] Detect duplicate [super dealloc] calls

2016-02-22 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Feb 22 11:56:24 2016 New Revision: 261545 URL: http://llvm.org/viewvc/llvm-project?rev=261545&view=rev Log: [analyzer] Detect duplicate [super dealloc] calls Add an alpha path checker that warns about duplicate calls to [super dealloc]. This will form the foundation of

Re: [PATCH] D5238: [analyzer] Detect duplicate [super dealloc] calls

2016-02-22 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261545: [analyzer] Detect duplicate [super dealloc] calls (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D5238?vs=48447&id=48707#toc Repository: rL LLVM http://reviews.llv

[PATCH] D17528: [analyzer] Warn on use of 'self' after call to to [super dealloc].

2016-02-22 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added a reviewer: zaks.anna. dcoughlin added a subscriber: cfe-commits. Referring to 'self' after a call to [super dealloc] is a use-after-free in Objective-C because NSObject's -dealloc frees the memory pointed to by self. This patch extends the ObjCS

Re: [PATCH] D17511: [analyzer] Make ObjCDeallocChecker path sensitive.

2016-02-22 Thread Devin Coughlin via cfe-commits
dcoughlin added a subscriber: cfe-commits. dcoughlin updated this revision to Diff 48750. dcoughlin added a comment. Provide diff with context. Apologies for leaving that out. http://reviews.llvm.org/D17511 Files: lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp test/Analysis/DeallocMissing

r261703 - [analyzer] Find ObjC 'self' decl even when block captures local named 'self'.

2016-02-23 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Feb 23 16:26:04 2016 New Revision: 261703 URL: http://llvm.org/viewvc/llvm-project?rev=261703&view=rev Log: [analyzer] Find ObjC 'self' decl even when block captures local named 'self'. When looking up the 'self' decl in block captures, make sure to find the actual sel

Re: [PATCH] D17511: [analyzer] Make ObjCDeallocChecker path sensitive.

2016-02-24 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp:184 @@ -144,21 +183,3 @@ - // Determine if the class subclasses NSObject. - IdentifierInfo* NSObjectII = &Ctx.Idents.get("NSObject"); - IdentifierInfo* SenTestCaseII = &Ctx.Idents.ge

Re: [PATCH] D17511: [analyzer] Make ObjCDeallocChecker path sensitive.

2016-02-24 Thread Devin Coughlin via cfe-commits
dcoughlin updated this revision to Diff 48995. dcoughlin marked 8 inline comments as done. dcoughlin added a comment. This update addresses Anna's review comments. The big change is that the program state now maps instance symbols to sets of initial ivar symbols that must be released. (Rather th

Re: [PATCH] D17511: [analyzer] Make ObjCDeallocChecker path sensitive.

2016-02-25 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp:804 @@ +803,3 @@ +/// Returns true if there is a call to -dealloc anywhere on the stack and false +/// otherwise. If true, it also sets \param SelfValOut to the value of +/// 'self' in th

r261917 - [analyzer] Make ObjCDeallocChecker path sensitive.

2016-02-25 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Feb 25 12:55:24 2016 New Revision: 261917 URL: http://llvm.org/viewvc/llvm-project?rev=261917&view=rev Log: [analyzer] Make ObjCDeallocChecker path sensitive. Convert the ObjCDeallocChecker to be path sensitive. The primary motivation for this change is to prevent fals

Re: [PATCH] D17511: [analyzer] Make ObjCDeallocChecker path sensitive.

2016-02-25 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261917: [analyzer] Make ObjCDeallocChecker path sensitive. (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D17511?vs=48995&id=49097#toc Repository: rL LLVM http://reviews.l

r261921 - Revert "[analyzer] Make ObjCDeallocChecker path sensitive."

2016-02-25 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Feb 25 13:13:43 2016 New Revision: 261921 URL: http://llvm.org/viewvc/llvm-project?rev=261921&view=rev Log: Revert "[analyzer] Make ObjCDeallocChecker path sensitive." This reverts commit r261917. It broke the bots. Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/

r261929 - [analyzer] Reapply r261917 with a fix.

2016-02-25 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Feb 25 15:15:16 2016 New Revision: 261929 URL: http://llvm.org/viewvc/llvm-project?rev=261929&view=rev Log: [analyzer] Reapply r261917 with a fix. This reapplies "[analyzer] Make ObjCDeallocChecker path sensitive." (r261917) with a fix for an error on some bots about s

r261935 - [analyzer] Warn on use of 'self' after call to to [super dealloc].

2016-02-25 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Feb 25 17:36:52 2016 New Revision: 261935 URL: http://llvm.org/viewvc/llvm-project?rev=261935&view=rev Log: [analyzer] Warn on use of 'self' after call to to [super dealloc]. Referring to 'self' after a call to [super dealloc] is a use-after-free in Objective-C because

Re: [PATCH] D17528: [analyzer] Warn on use of 'self' after call to to [super dealloc].

2016-02-25 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. dcoughlin marked an inline comment as done. Closed by commit rL261935: [analyzer] Warn on use of 'self' after call to to [super dealloc]. (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D17528?vs

Re: [PATCH] D17528: [analyzer] Warn on use of 'self' after call to to [super dealloc].

2016-02-25 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp:165 @@ +164,3 @@ + if (Desc.empty()) +Desc = "use of 'self' after it is freed with call to [super dealloc]"; + zaks.anna wrote: > Does "has been freed" sound

r261944 - [analyzer] Fix a memory error in r261935 caught by the Windows bots.

2016-02-25 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Feb 25 18:23:41 2016 New Revision: 261944 URL: http://llvm.org/viewvc/llvm-project?rev=261944&view=rev Log: [analyzer] Fix a memory error in r261935 caught by the Windows bots. It was using a temporary StringRef after its underlying storage was freed. Modified: cf

r261945 - [analyzer] Shorten ObjcSuperDeallocChecker diagnostics.

2016-02-25 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Feb 25 18:47:42 2016 New Revision: 261945 URL: http://llvm.org/viewvc/llvm-project?rev=261945&view=rev Log: [analyzer] Shorten ObjcSuperDeallocChecker diagnostics. Change "use of 'self' after it has been freed with call to [super dealloc]" to "use of 'self' after it ha

r261970 - [analyzer] Prune some incorrect \param doc comment annotations.

2016-02-25 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Feb 25 21:41:31 2016 New Revision: 261970 URL: http://llvm.org/viewvc/llvm-project?rev=261970&view=rev Log: [analyzer] Prune some incorrect \param doc comment annotations. Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp cfe/trunk/lib/Static

r267924 - [analyzer] Add path note for localizability checker.

2016-04-28 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Apr 28 14:44:40 2016 New Revision: 267924 URL: http://llvm.org/viewvc/llvm-project?rev=267924&view=rev Log: [analyzer] Add path note for localizability checker. Add a path note indicating the location of the non-localized string literal in NonLocalizedStringChecker. r

r268764 - [www][analyzer] Add FAQ about suppression of missing localization diagnostic.

2016-05-06 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri May 6 12:51:34 2016 New Revision: 268764 URL: http://llvm.org/viewvc/llvm-project?rev=268764&view=rev Log: [www][analyzer] Add FAQ about suppression of missing localization diagnostic. Modified: cfe/trunk/www/analyzer/faq.html Modified: cfe/trunk/www/analyzer/faq

r268768 - [www][analyzer] Update recommended suppression mechanism for localization.

2016-05-06 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri May 6 13:13:30 2016 New Revision: 268768 URL: http://llvm.org/viewvc/llvm-project?rev=268768&view=rev Log: [www][analyzer] Update recommended suppression mechanism for localization. Based on feedback from Jordan Rose, make the recommended suppression function be 'sta

r268773 - [analyzer] Add tests for Objective-C class properties

2016-05-06 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri May 6 13:24:50 2016 New Revision: 268773 URL: http://llvm.org/viewvc/llvm-project?rev=268773&view=rev Log: [analyzer] Add tests for Objective-C class properties Add basic tests to ensure the analyzer has support for class properties. This is a test-only change. rdar:

Re: [PATCH] D19866: [Analyzer] Correct stack address escape diagnostic

2016-05-06 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: llvm/tools/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp:229 @@ -228,3 +228,3 @@ BT_stackleak.reset( -new BuiltinBug(this, "Stack address stored into global variable", - "Stack address

<    1   2   3   4   5   >