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

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=70493#toc Repository: rL

[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

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=rev Log: [analyzer] Use lazily created buffer in EmptyLocalizationContextChecker Fix a crash when relexing the underlying memory buffer to find incorrect arguments to

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

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

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

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=rev Log: [www] Add nullability questions to analyzer FAQ. Modified: cfe/trunk/www/analyzer/faq.html Modified: cfe/trunk/www/analyzer/faq.html URL:

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

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=rev Log: [analyzer] Weaken assertion in trackNullOrUndefValue() We should ignore paren casts when making sure that the semantic expression in a PseudoObjectExpr for an ObjC

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

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

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

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

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

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=rev Log: [analyzer] Teach RetainCountChecker about CVFooRetain Change the retain count checker to treat CoreFoundation-style "CV"-prefixed reference types from CoreVideo

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

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

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=66594#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] 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=66554#toc Repository: rL LLVM

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

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

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

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,

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] 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] 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=66225#toc Repository: rL LLVM

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

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`

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

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=rev Log: [analyzer] Fix misleading indentation in ObjCDeallocChecker. NFC. Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp Modified:

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=rev Log: [analyzer] Add check::BeginFunction to CheckerDocumentation checks. NFC. This was an oversight from when I added BeginFunction support in r261293. Modified:

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.

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

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

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] 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=64996#toc Repository: rL LLVM

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=rev Log: [analyzer] Add checker modeling potential C++ self-assignment This checker checks copy and move assignment operators whether they are protected against

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

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

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

2016-07-18 Thread Devin Coughlin via cfe-commits
he 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 >> <cfe-commits@lists.llvm.org> wrote: >> >> Author:

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=rev Log: Revert "[analyzer] Add checker modeling potential C++ self-assignment" This reverts commit r275820. It is failing on the bots. Removed:

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

2016-07-18 Thread Devin Coughlin via cfe-commits
/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 fixed/figured out soon. > > Thanks, > Hans > > On Mon, Jul 18, 2016 at 10:23 AM, Devin Coughlin via cfe-commits > <cfe-commits@lists.llvm.org&

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

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

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

2016-07-18 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Jul 18 12:23:30 2016 New Revision: 275820 URL: http://llvm.org/viewvc/llvm-project?rev=275820=rev Log: [analyzer] Add checker modeling potential C++ self-assignment This checker checks copy and move assignment operators whether they are protected against

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

2016-07-14 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Other than adding expected notes for the path notes to the test, this looks good to me. Thanks Ádám! Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1698 @@ +1697,3 @@ +PathDiagnosticPiece * +CXXSelfAssignmentBRVisitor::VisitNode(const

Re: [PATCH] D21667: [analyzer] Add rudimentary handling of AtomicExpr.

2016-07-07 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL274816: [analyzer] Add rudimentary handling of AtomicExpr. (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D21667?vs=63096=63172#toc Repository: rL LLVM

r274816 - [analyzer] Add rudimentary handling of AtomicExpr.

2016-07-07 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Jul 7 19:53:18 2016 New Revision: 274816 URL: http://llvm.org/viewvc/llvm-project?rev=274816=rev Log: [analyzer] Add rudimentary handling of AtomicExpr. This proposed patch adds crude handling of atomics to the static analyzer. Rather than ignore AtomicExprs, as we

Re: [PATCH] D21667: [analyzer] Add rudimentary handling of AtomicExpr.

2016-07-07 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Anna and Jordan said I should just go ahead and commit this. http://reviews.llvm.org/D21667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21667: [analyzer] Add rudimentary handling of AtomicExpr.

2016-07-07 Thread Devin Coughlin via cfe-commits
dcoughlin marked an inline comment as done. dcoughlin added a comment. Ping. Richard: Would you be willing to take a quick look at the change to the AST? http://reviews.llvm.org/D21667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D21667: [analyzer] Add rudimentary handling of AtomicExpr.

2016-07-07 Thread Devin Coughlin via cfe-commits
dcoughlin marked an inline comment as done. Comment at: test/Analysis/atomics.c:5 @@ +4,3 @@ +// because we don't fully model the atomics and instead imprecisely +// treat their arguments as escaping. + Thanks! Fixed. http://reviews.llvm.org/D21667

Re: [PATCH] D21667: [analyzer] Add rudimentary handling of AtomicExpr.

2016-07-07 Thread Devin Coughlin via cfe-commits
dcoughlin updated this revision to Diff 63096. dcoughlin added a comment. Fix typo and bad indentation. http://reviews.llvm.org/D21667 Files: include/clang/AST/Expr.h include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h lib/StaticAnalyzer/Core/ExprEngine.cpp

Re: [PATCH] D22048: [analyzer] Suppress false positives in std::shared_ptr

2016-07-07 Thread Devin Coughlin via cfe-commits
dcoughlin closed this revision. dcoughlin added a comment. This was committed in r274691. I forgot to add the Differential Revision line so phabricator didn't pick it up. http://reviews.llvm.org/D22048 ___ cfe-commits mailing list

r274691 - [analyzer] Suppress false positives in std::shared_ptr

2016-07-06 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Jul 6 16:52:55 2016 New Revision: 274691 URL: http://llvm.org/viewvc/llvm-project?rev=274691=rev Log: [analyzer] Suppress false positives in std::shared_ptr The analyzer does not model C++ temporary destructors completely and so reports false alarms about leaks of

Re: [PATCH] D22048: [analyzer] Suppress false positives in std::shared_ptr

2016-07-06 Thread Devin Coughlin via cfe-commits
dcoughlin updated the summary for this revision. dcoughlin updated this revision to Diff 62978. dcoughlin added a comment. Address Artem's comments: fix a copy-pasta mistake and separate out std stubs with deliberate divide-by-zero bugs into their own simulated header file. This required moving

Re: [PATCH] D22048: [analyzer] Suppress false positives in std::shared_ptr

2016-07-06 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: test/Analysis/Inputs/system-header-simulator-cxx.h:349 @@ +348,3 @@ +// No warning is expected as we are suppressing warning coming +// out of std::basic_string. +int z = 0; NoQ wrote: > You mean

[PATCH] D22048: [analyzer] Suppress false positives in std::shared_ptr

2016-07-06 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added reviewers: zaks.anna, NoQ. dcoughlin added a subscriber: cfe-commits. Herald added a subscriber: aemerson. The analyzer does not model C++ temporary destructors completely and so reports false alarms about leaks of memory allocated by the

[PATCH] D21667: [analyzer] Add rudimentary handling of AtomicExpr.

2016-06-23 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added reviewers: zaks.anna, rsmith. dcoughlin added a subscriber: cfe-commits. This proposed patch adds crude handling of atomics to the static analyzer. Rather than ignore AtomicExprs, as we now do, this patch causes the analyzer to escape the

r273441 - [analyzer] Teach ObjCDeallocChecker about XCTestCase

2016-06-22 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Jun 22 12:03:10 2016 New Revision: 273441 URL: http://llvm.org/viewvc/llvm-project?rev=273441=rev Log: [analyzer] Teach ObjCDeallocChecker about XCTestCase Like with SenTestCase, subclasses of XCTestCase follow a "tear down" idiom to release instance variables and so

r273340 - [analyzer] Teach trackNullOrUndefValue() about class property accessors.

2016-06-21 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Jun 21 19:20:00 2016 New Revision: 273340 URL: http://llvm.org/viewvc/llvm-project?rev=273340=rev Log: [analyzer] Teach trackNullOrUndefValue() about class property accessors. Teach trackNullOrUndefValue() how to properly look through PseudoObjectExprs to find the

Re: [PATCH] D21081: MPI-Checker patch for Clang Static Analyzer

2016-06-12 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL272529: [analyzer] Add checker to verify the correct usage of the MPI API (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D21081?vs=60472=60486#toc Repository: rL LLVM

r272529 - [analyzer] Add checker to verify the correct usage of the MPI API

2016-06-12 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sun Jun 12 22:22:41 2016 New Revision: 272529 URL: http://llvm.org/viewvc/llvm-project?rev=272529=rev Log: [analyzer] Add checker to verify the correct usage of the MPI API This commit adds a static analysis checker to verify the correct usage of the MPI API in C and

Re: [PATCH] D21081: MPI-Checker patch for Clang Static Analyzer

2016-06-12 Thread Devin Coughlin via cfe-commits
dcoughlin updated this revision to Diff 60472. dcoughlin added a comment. Alexander, a drawback with using keeping a vector of MPIBugReporters in the checker is that this will essentially "leak" all the created bug reporters. How about this instead: - Remove MPIBugReporter's

Re: [PATCH] D19260: [analyzer][scan-build-py] subprocess output handling reviewed in clang module

2016-06-09 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. This looks good to me. I've run this on a suite of open source projects and it reported no changes in the reference results. Thanks for simplifying and adding the extra tests!

Re: [PATCH] D20933: Preallocate ExplodedNode hash table

2016-06-08 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. A 6% speed improvement could be a big win! Do we have a sense of what the expected increased memory cost (as a % of average use over the lifetime of the process) is? My guess is it would be relatively low. I suspect most analyzer users run relatively few concurrent

Re: [PATCH] D21081: MPI-Checker patch for Clang Static Analyzer

2016-06-07 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Here is the ASan report. It looks to me like the issue is that MPIChecker is holding on a reference to a clang::ento::BugReporter after the lifetime of the BugReporter has ended. The BugReporter lives in ExprEngine and the analyzer creates a new ExprEngine for each

Re: [PATCH] D21081: MPI-Checker patch for Clang Static Analyzer

2016-06-07 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Alexander, When I committed your patch, the AddressSanitizer bots found a memory corruption issue so I reverted it. This will need to be fixed before we can commit the patch. Since Phabricator automatically closed http://reviews.llvm.org/D12761, I've created a new

[PATCH] D21081: MPI-Checker patch for Clang Static Analyzer

2016-06-07 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added reviewers: zaks.anna, dcoughlin, Alexander_Droste. dcoughlin added a subscriber: cfe-commits. (Cloning the revision for the ASan issue since the old one is closed and can't be re-opened) This patch adds a static analysis checker to verify the

r271984 - Revert "[analyzer] Reapply r271907 (2nd try)."

2016-06-06 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Jun 7 00:37:02 2016 New Revision: 271984 URL: http://llvm.org/viewvc/llvm-project?rev=271984=rev Log: Revert "[analyzer] Reapply r271907 (2nd try)." Even with the fix in r271981, ASan is finding a stack use after return. This reverts commits r271977 and r271981.

Re: [PATCH] D12761: MPI-Checker patch for Clang Static Analyzer

2016-06-06 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Fixed the compilation issues with gcc in r271977 r271981, but it is still failing with Address Sanitizer diagnostics: 18751==ERROR: AddressSanitizer: stack-use-after-return on address 0x7f0c695ebc70 at pc 0x0867b44c bp 0x7ffe3b01d6f0 sp 0x7ffe3b01d6e8

r271981 - [analyzer] Speculative fix for r271907.

2016-06-06 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Jun 6 23:44:52 2016 New Revision: 271981 URL: http://llvm.org/viewvc/llvm-project?rev=271981=rev Log: [analyzer] Speculative fix for r271907. Fix a compilation error on the bots involving brace initialization. Differential Revision: http://reviews.llvm.org/D12761

r271977 - [analyzer] Reapply r271907 (2nd try).

2016-06-06 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Jun 6 23:23:08 2016 New Revision: 271977 URL: http://llvm.org/viewvc/llvm-project?rev=271977=rev Log: [analyzer] Reapply r271907 (2nd try). Second try at reapplying "[analyzer] Add checker for correct usage of MPI API in C and C++." Special thanks to Dan Liew for

r271920 - Revert "Reapply "[analyzer] Add checker for correct usage of MPI API in C and C++.""

2016-06-06 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Jun 6 13:29:43 2016 New Revision: 271920 URL: http://llvm.org/viewvc/llvm-project?rev=271920=rev Log: Revert "Reapply "[analyzer] Add checker for correct usage of MPI API in C and C++."" This reverts commit r271914. It is still breaking bots. Removed:

r271914 - Reapply "[analyzer] Add checker for correct usage of MPI API in C and C++."

2016-06-06 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Jun 6 13:08:35 2016 New Revision: 271914 URL: http://llvm.org/viewvc/llvm-project?rev=271914=rev Log: Reapply "[analyzer] Add checker for correct usage of MPI API in C and C++." Reapply r271907 with a fix for the compiler error with gcc about specializing

Re: [PATCH] D12761: MPI-Checker patch for Clang Static Analyzer

2016-06-06 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. This doesn't compile under gcc so it broke the bots. The fix is to move the specialization of clang::ento::ProgramStateTrait for RequestMapImpl out of the global namespace and into clang::ento. I will apply and recommit. Repository: rL LLVM

r271909 - Revert "[analyzer] Add checker for correct usage of MPI API in C and C++."

2016-06-06 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Jun 6 12:01:08 2016 New Revision: 271909 URL: http://llvm.org/viewvc/llvm-project?rev=271909=rev Log: Revert "[analyzer] Add checker for correct usage of MPI API in C and C++." This reverts commit r271907. It broke a bunch of bots with compile errors about

Re: [PATCH] D12761: MPI-Checker patch for Clang Static Analyzer

2016-06-06 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL271907: [analyzer] Add checker for correct usage of MPI API in C and C++. (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D12761?vs=54001=59742#toc Repository: rL LLVM

r271907 - [analyzer] Add checker for correct usage of MPI API in C and C++.

2016-06-06 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Jun 6 11:47:16 2016 New Revision: 271907 URL: http://llvm.org/viewvc/llvm-project?rev=271907=rev Log: [analyzer] Add checker for correct usage of MPI API in C and C++. This commit adds a static analysis checker to check for the correct usage of the MPI API in C and

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

2016-05-17 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Thanks for the patch! This looks like it will catch some nasty bugs. My comments (inline) are mostly nits. But two are more substantial: (1) you should add a path note where the self-assignment assumption is made explaining the assumption to the user and (2) the

r269227 - [analyzer] Fix crash in ObjCGenericsChecker

2016-05-11 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed May 11 15:28:41 2016 New Revision: 269227 URL: http://llvm.org/viewvc/llvm-project?rev=269227=rev Log: [analyzer] Fix crash in ObjCGenericsChecker Fix a crash in the generics checker where DynamicTypePropagation tries to get the superclass of a root class. This is a

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

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

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=rev Log: [www][analyzer] Update recommended suppression mechanism for localization. Based on feedback from Jordan Rose, make the recommended suppression function be 'static

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=rev Log: [www][analyzer] Add FAQ about suppression of missing localization diagnostic. Modified: cfe/trunk/www/analyzer/faq.html Modified:

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=rev Log: [analyzer] Add path note for localizability checker. Add a path note indicating the location of the non-localized string literal in NonLocalizedStringChecker.

r266219 - [analyzer] Nullability: Suppress diagnostic on bind with cast.

2016-04-13 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Apr 13 12:59:24 2016 New Revision: 266219 URL: http://llvm.org/viewvc/llvm-project?rev=266219=rev Log: [analyzer] Nullability: Suppress diagnostic on bind with cast. Update the nullability checker to allow an explicit cast to nonnull to suppress a warning on an

r266157 - [analyzer] Nullability: Treat nil _Nonnull ivar as invariant violation.

2016-04-12 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Apr 12 19:41:54 2016 New Revision: 266157 URL: http://llvm.org/viewvc/llvm-project?rev=266157=rev Log: [analyzer] Nullability: Treat nil _Nonnull ivar as invariant violation. Treat a _Nonnull ivar that is nil as an invariant violation in a similar fashion to how a nil

r266109 - [analyzer] Nullability: Suppress return diagnostics in inlined functions.

2016-04-12 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Apr 12 14:29:52 2016 New Revision: 266109 URL: http://llvm.org/viewvc/llvm-project?rev=266109=rev Log: [analyzer] Nullability: Suppress return diagnostics in inlined functions. The nullability checker can sometimes miss detecting nullability precondition violations in

r266031 - [analyzer] Fix assertion in ReturnVisitor for body-farm synthesized getters

2016-04-11 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Apr 11 19:53:26 2016 New Revision: 266031 URL: http://llvm.org/viewvc/llvm-project?rev=266031=rev Log: [analyzer] Fix assertion in ReturnVisitor for body-farm synthesized getters Don't emit a path note marking the return site if the return statement does not have a

r265839 - [analyzer] Teach trackNullOrUndefValue about calls to property accessors.

2016-04-08 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Apr 8 14:59:16 2016 New Revision: 265839 URL: http://llvm.org/viewvc/llvm-project?rev=265839=rev Log: [analyzer] Teach trackNullOrUndefValue about calls to property accessors. Teach trackNullOrUndefValue() how to look through PseudoObjectExprs to find the underlying

r265103 - [analyzer] Prefer accessor method in extension over category in CallEvent.

2016-03-31 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Mar 31 22:24:13 2016 New Revision: 265103 URL: http://llvm.org/viewvc/llvm-project?rev=265103=rev Log: [analyzer] Prefer accessor method in extension over category in CallEvent. In ObjCMethodCall:getRuntimeDefinition(), if the method is an accessor in a category, and

r264687 - [analyzer] Use BodyFarm-synthesized body even when actual body available.

2016-03-28 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Mar 28 18:55:58 2016 New Revision: 264687 URL: http://llvm.org/viewvc/llvm-project?rev=264687=rev Log: [analyzer] Use BodyFarm-synthesized body even when actual body available. Change body autosynthesis to use the BodyFarm-synthesized body even when an actual body

r264647 - [analyzer] Nullability: Don't warn along paths where null returned from non-null.

2016-03-28 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Mar 28 15:30:25 2016 New Revision: 264647 URL: http://llvm.org/viewvc/llvm-project?rev=264647=rev Log: [analyzer] Nullability: Don't warn along paths where null returned from non-null. Change the nullability checker to not warn along paths where null is returned

r264463 - [analyzer] Add CIFIlter modeling to DeallocChecker.

2016-03-25 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Mar 25 16:18:22 2016 New Revision: 264463 URL: http://llvm.org/viewvc/llvm-project?rev=264463=rev Log: [analyzer] Add CIFIlter modeling to DeallocChecker. The -dealloc method in CIFilter is highly unusual in that it will release instance variables belonging to its

Re: [PATCH] D18280: [tsan] Allow -fsanitize=thread for iOS-style simulator targets

2016-03-20 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL263913: [tsan] Allow -fsanitize=thread for iOS-style simulator targets (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D18280?vs=51076=51132#toc Repository: rL LLVM

r263913 - [tsan] Allow -fsanitize=thread for iOS-style simulator targets

2016-03-20 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sun Mar 20 13:24:33 2016 New Revision: 263913 URL: http://llvm.org/viewvc/llvm-project?rev=263913=rev Log: [tsan] Allow -fsanitize=thread for iOS-style simulator targets Update the clang driver to allow -fsanitize=thread when targeting x86_64 iOS and tvOS simulators.

Re: [PATCH] D18280: [tsan] Allow -fsanitize=thread for iOS-style simulator targets

2016-03-19 Thread Devin Coughlin via cfe-commits
dcoughlin updated this revision to Diff 51076. dcoughlin added a comment. Added tests for iOS and iOS simulators. http://reviews.llvm.org/D18280 Files: lib/Driver/ToolChains.cpp test/Driver/fsanitize.c Index: test/Driver/fsanitize.c

Re: [PATCH] D18280: [tsan] Allow -fsanitize=thread for iOS-style simulator targets

2016-03-18 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. There is a related patch for compiler-rt at http://reviews.llvm.org/D18277 http://reviews.llvm.org/D18280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   >