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

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 poten

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&view=rev Log: [analyzer] Prefer accessor method in extension over category in CallEvent. In ObjCMethodCall:getRuntimeDefinition(), if the method is an accessor in a category,

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&view=rev Log: [analyzer] Teach trackNullOrUndefValue about calls to property accessors. Teach trackNullOrUndefValue() how to look through PseudoObjectExprs to find the underly

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

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&view=rev Log: [analyzer] Nullability: Suppress return diagnostics in inlined functions. The nullability checker can sometimes miss detecting nullability precondition violation

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

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

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

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&id=59742#toc Repository: rL LLVM h

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

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

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

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&view=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: cfe/t

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

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&view=rev Log: [analyzer] Speculative fix for r271907. Fix a compilation error on the bots involving brace initialization. Differential Revision: http://reviews.llvm.org/D1276

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

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

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

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 re

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 to

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 'c

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

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&view=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
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&id=60486#toc Repository: rL LLVM h

r272530 - [analyzer] Remove some list initialization from MPI Checker to make MSVC bots happy.

2016-06-12 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sun Jun 12 22:58:58 2016 New Revision: 272530 URL: http://llvm.org/viewvc/llvm-project?rev=272530&view=rev Log: [analyzer] Remove some list initialization from MPI Checker to make MSVC bots happy. This is a speculative attempt to fix the compiler error: "list initializati

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&view=rev Log: [analyzer] Teach trackNullOrUndefValue() about class property accessors. Teach trackNullOrUndefValue() how to properly look through PseudoObjectExprs to find 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&view=rev Log: [analyzer] Teach ObjCDeallocChecker about XCTestCase Like with SenTestCase, subclasses of XCTestCase follow a "tear down" idiom to release instance variables and

[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 arguments.

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

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 std::shared

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

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

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 cfe-commits@lists

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 test/Analysis/atomic

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 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 http://

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

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

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

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 Exp

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

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

r262261 - [analyzer] Don't treat calls to system headers as escaping in CheckObjCDealloc.

2016-02-29 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Feb 29 15:44:08 2016 New Revision: 262261 URL: http://llvm.org/viewvc/llvm-project?rev=262261&view=rev Log: [analyzer] Don't treat calls to system headers as escaping in CheckObjCDealloc. This prevents false negatives when a -dealloc method, for example, removes itsel

r262272 - [analyzer] Teach CheckObjCDealloc about Block_release().

2016-02-29 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Feb 29 17:57:10 2016 New Revision: 262272 URL: http://llvm.org/viewvc/llvm-project?rev=262272&view=rev Log: [analyzer] Teach CheckObjCDealloc about Block_release(). It now treats Block_release(b) as a release in addition to [b release]. Modified: cfe/trunk/lib/Sta

r262277 - [analyzer] Update CheckObjCDealloc diagnostic for missing -dealloc.

2016-02-29 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Feb 29 18:39:04 2016 New Revision: 262277 URL: http://llvm.org/viewvc/llvm-project?rev=262277&view=rev Log: [analyzer] Update CheckObjCDealloc diagnostic for missing -dealloc. Update the diagnostic for classes missing -dealloc to mention an instance variable that needs

r262520 - [analyzer] Fix capitalization in ObjCSuperDeallocChecker diagnostic.

2016-03-02 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Mar 2 15:22:48 2016 New Revision: 262520 URL: http://llvm.org/viewvc/llvm-project?rev=262520&view=rev Log: [analyzer] Fix capitalization in ObjCSuperDeallocChecker diagnostic. Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp cfe/trun

r262524 - [analyzer] Move ObjCDeallocChecker out of the alpha package.

2016-03-02 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Mar 2 15:50:54 2016 New Revision: 262524 URL: http://llvm.org/viewvc/llvm-project?rev=262524&view=rev Log: [analyzer] Move ObjCDeallocChecker out of the alpha package. It will now be on by default on Darwin. rdar://problem/6927496 Modified: cfe/trunk/lib/StaticA

r262526 - [analyzer] Move ObjCSuperDeallocChecker out of the alpha package.

2016-03-02 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Mar 2 16:01:03 2016 New Revision: 262526 URL: http://llvm.org/viewvc/llvm-project?rev=262526&view=rev Log: [analyzer] Move ObjCSuperDeallocChecker out of the alpha package. It will now be on by default on Darwin. rdar://problem/6953275 Modified: cfe/trunk/lib/St

r262659 - [analyzer] ObjCDeallocChecker: Only check for nil-out when type is retainable.

2016-03-03 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Mar 3 15:38:39 2016 New Revision: 262659 URL: http://llvm.org/viewvc/llvm-project?rev=262659&view=rev Log: [analyzer] ObjCDeallocChecker: Only check for nil-out when type is retainable. This fixes a crash when setting a property of struct type in -dealloc. Modified:

r262729 - [analyzer] Add diagnostic in ObjCDeallocChecker for use of -dealloc instead of -release.

2016-03-04 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Mar 4 12:09:58 2016 New Revision: 262729 URL: http://llvm.org/viewvc/llvm-project?rev=262729&view=rev Log: [analyzer] Add diagnostic in ObjCDeallocChecker for use of -dealloc instead of -release. In dealloc methods, the analyzer now warns when -dealloc is called dire

r262763 - [analyzer] Nullability: add option to not report on calls to system headers.

2016-03-04 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Mar 4 19:32:43 2016 New Revision: 262763 URL: http://llvm.org/viewvc/llvm-project?rev=262763&view=rev Log: [analyzer] Nullability: add option to not report on calls to system headers. Add an -analyzer-config 'nullability:NoDiagnoseCallsToSystemHeaders' option to the n

Re: [PATCH] D16044: getVariableName() for MemRegion

2016-03-06 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Hi Alexander, Some comments in line. Also, I don't see any tests. Is this code tested by your MPI patch? Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:160 @@ -153,1 +159,3 @@ + /// \returns variable name for memory region +

Re: [PATCH] D16044: getVariableName() for MemRegion

2016-03-07 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:160 @@ -153,1 +159,3 @@ + /// \returns variable name for memory region + std::string getVariableName() const; }; Alexander_Droste wrote: > dcoughlin wrote:

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

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 =

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&view=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-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&id=51132#toc Repository: rL LLVM http

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

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

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

Re: [PATCH] D18363: Fix typo s/initalize/initialize/

2016-03-28 Thread Devin Coughlin via cfe-commits
dcoughlin added a subscriber: dcoughlin. dcoughlin added a comment. Thanks for fixing this! Repository: rL LLVM http://reviews.llvm.org/D18363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

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 cfe-commits@lists.llv

r256524 - Small refactoring in CheckerContext::isCLibraryFunction(). NFC.

2015-12-28 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Dec 28 15:47:51 2015 New Revision: 256524 URL: http://llvm.org/viewvc/llvm-project?rev=256524&view=rev Log: Small refactoring in CheckerContext::isCLibraryFunction(). NFC. Use getRedeclContext() instead of a manually-written loop and fix a comment. A patch by Aleksei

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

2015-12-28 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL256524: Small refactoring in CheckerContext::isCLibraryFunction(). NFC. (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D15794?vs=43688&id=43706#toc Repository: rL LLVM htt

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&view=rev Log: [analyzer] Nullability: allow cast to _Nonnull to suppress warning about returning nil. The nullability checker currently allows casts to suppress warnings when

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

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&view=rev Log: [analyzer] Handle another Android assert function. Android's assert can call both the __assert and __assert2 functions under the cover, but the NoReturnFunction

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 thes

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 cfe-commits@lists.llvm.org

Re: [PATCH] D16062: [analyzer] Rename kind-enumeration values of SVal, SymExpr, MemRegion classes, for consistency.

2016-01-11 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Looks good to me. Thanks for making this more consistent! Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:102 @@ -103,1 +101,3 @@ +BEGIN_TYPED_REGIONS, +FunctionTextRegionKind = BEGIN_TYPED_REGIONS, BlockTextRegionK

Re: [PATCH] D16062: [analyzer] Rename kind-enumeration values of SVal, SymExpr, MemRegion classes, for consistency.

2016-01-12 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. Please commit! http://reviews.llvm.org/D16062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

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

2016-01-12 Thread Devin Coughlin via cfe-commits
dcoughlin closed this revision. dcoughlin added a comment. This was committed in r257533. Thanks Laszlo! http://reviews.llvm.org/D9600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r257938 - [analyzer] Check for return of nil in ObjC methods with nonnull return type.

2016-01-15 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Jan 15 15:35:40 2016 New Revision: 257938 URL: http://llvm.org/viewvc/llvm-project?rev=257938&view=rev Log: [analyzer] Check for return of nil in ObjC methods with nonnull return type. Update NullabilityChecker so that it checks return statements in ObjC methods. Previ

r258061 - [analyzer] Nullability: Look through implicit casts when suppressing warnings on return.

2016-01-18 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Jan 18 12:53:33 2016 New Revision: 258061 URL: http://llvm.org/viewvc/llvm-project?rev=258061&view=rev Log: [analyzer] Nullability: Look through implicit casts when suppressing warnings on return. In r256567 I changed the nullability checker to suppress warnings about

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

2016-01-19 Thread Devin Coughlin via cfe-commits
dcoughlin added a subscriber: dcoughlin. dcoughlin added a comment. As Artem notes, you can't defer to the host strcmp() -- doing so is just as unsound as using StringRef::compare() less predictable under optimization of the analyzer. I think his suggested approach is the way to go: create a sym

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

2016-01-19 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. ayartsev: > This also may theoretically help to find defects if a tested code relays on a > value returned from strcmp like > if (strcmp(x, y) == 1) { ... } I think it would be useful and not that difficult to write a checker that checks for this explicitly. I don'

Re: [PATCH] D16115: [test-suite] Add ClangAnalyzerBenchmarks directory to test-suite repository

2016-01-19 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Ping. Any objections to adding a new 'ClangAnalyzer' directory to test-suite? http://reviews.llvm.org/D16115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

Re: [PATCH] D16115: [test-suite] Add ClangAnalyzerBenchmarks directory to test-suite repository

2016-01-20 Thread Devin Coughlin via cfe-commits
dcoughlin closed this revision. dcoughlin added a comment. Committed in r258336. http://reviews.llvm.org/D16115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r258426 - [driver] Enable some static analyzer "unix" checkers on Windows.

2016-01-21 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Jan 21 14:09:49 2016 New Revision: 258426 URL: http://llvm.org/viewvc/llvm-project?rev=258426&view=rev Log: [driver] Enable some static analyzer "unix" checkers on Windows. Many of the "unix" checkers are not actually unix-specific and would be valuable to run on Windo

r258461 - [analyzer] Suppress nullability warning for defensive super initializer idiom.

2016-01-21 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Jan 21 19:01:11 2016 New Revision: 258461 URL: http://llvm.org/viewvc/llvm-project?rev=258461&view=rev Log: [analyzer] Suppress nullability warning for defensive super initializer idiom. A common idiom in Objective-C initializers is for a defensive nil-check on the res

Re: [PATCH] D5031: [analyzer] Remove duplicate test case from MissingDealloc.m

2016-01-21 Thread Devin Coughlin via cfe-commits
dcoughlin abandoned this revision. dcoughlin added a comment. Abandoning because the test-case removal was incorporated into http://reviews.llvm.org/D5023. http://reviews.llvm.org/D5031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

r258493 - [analyzer] Update SATestBuild.py to handle spaces in paths.

2016-01-21 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Jan 22 01:08:06 2016 New Revision: 258493 URL: http://llvm.org/viewvc/llvm-project?rev=258493&view=rev Log: [analyzer] Update SATestBuild.py to handle spaces in paths. The Jenkins workspace on the new Green Dragon builder for the static analyzer has spaces in its path

r258517 - [analyzer] SATestBuild.py: Handle spaces in path passed to --use-analyzer.

2016-01-22 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Jan 22 12:45:22 2016 New Revision: 258517 URL: http://llvm.org/viewvc/llvm-project?rev=258517&view=rev Log: [analyzer] SATestBuild.py: Handle spaces in path passed to --use-analyzer. I missed this one in r258493. Modified: cfe/trunk/utils/analyzer/SATestBuild.py

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

2016-01-22 Thread Devin Coughlin via cfe-commits
dcoughlin updated this revision to Diff 45756. dcoughlin marked 6 inline comments as done. dcoughlin added a comment. I've updated ddkilzer's patch to address Jordan's last round of comments. Specifically, I have: - Changed the patch to use isObjCRetainableType() to additional warn about proper

r258594 - [analyzer] SATestBuild.py: Remove html and log when producing reference results.

2016-01-22 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Jan 22 19:09:07 2016 New Revision: 258594 URL: http://llvm.org/viewvc/llvm-project?rev=258594&view=rev Log: [analyzer] SATestBuild.py: Remove html and log when producing reference results. The html reports are huge -- every issue in a given file results in a separate c

r258886 - [analyzer] Body farm: Look for property ivar in shadowing readwrite property.

2016-01-26 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Jan 26 17:58:48 2016 New Revision: 258886 URL: http://llvm.org/viewvc/llvm-project?rev=258886&view=rev Log: [analyzer] Body farm: Look for property ivar in shadowing readwrite property. After r251874, readonly properties that are shadowed by a readwrite property in a c

r258896 - [analyzer] ObjCDeallocChecker: Only operate on classes with retained properties.

2016-01-26 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Jan 26 19:41:58 2016 New Revision: 258896 URL: http://llvm.org/viewvc/llvm-project?rev=258896&view=rev Log: [analyzer] ObjCDeallocChecker: Only operate on classes with retained properties. Previously the ObjC Dealloc Checker only checked classes with ivars, not retaine

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

2016-01-26 Thread Devin Coughlin via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL258896: [analyzer] ObjCDeallocChecker: Only operate on classes with retained properties. (authored by dcoughlin). Changed prior to commit: http://reviews.llvm.org/D5023?vs=45756&id=46087#toc Repository

r259099 - [analyzer] Suppress nullability warnings in copy, mutableCopy, and init families.

2016-01-28 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Jan 28 16:23:34 2016 New Revision: 259099 URL: http://llvm.org/viewvc/llvm-project?rev=259099&view=rev Log: [analyzer] Suppress nullability warnings in copy, mutableCopy, and init families. There are multiple, common idioms of defensive nil-checks in copy, mutableCopy

r259118 - [analyzer] NullabilityChecker: Remove unused isReturnSelf() function.

2016-01-28 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Thu Jan 28 17:34:13 2016 New Revision: 259118 URL: http://llvm.org/viewvc/llvm-project?rev=259118&view=rev Log: [analyzer] NullabilityChecker: Remove unused isReturnSelf() function. Remove the now-unused isReturnSelf() function so we don't get a compiler warning. Apologies

r259222 - [analyzer] Suppress null reports from defensive checks in function-like macros.

2016-01-29 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Jan 29 12:47:13 2016 New Revision: 259222 URL: http://llvm.org/viewvc/llvm-project?rev=259222&view=rev Log: [analyzer] Suppress null reports from defensive checks in function-like macros. We already do this for case splits introduced as a result of defensive null check

r259288 - [analyzer] Make suppression of macro defensive checks work with -analyzer-eagerly-assume.

2016-01-29 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Jan 29 19:59:33 2016 New Revision: 259288 URL: http://llvm.org/viewvc/llvm-project?rev=259288&view=rev Log: [analyzer] Make suppression of macro defensive checks work with -analyzer-eagerly-assume. This is the default for the analyzer but the flag is added by the driv

Re: [PATCH] D16748: Cleanup MemRegion.cpp/MemRegion.h

2016-01-30 Thread Devin Coughlin via cfe-commits
dcoughlin added a subscriber: cfe-commits. dcoughlin added a comment. Also adding cfe-commits as a subscriber. (See http://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface). http://reviews.llvm.org/D16748 ___ cfe-commits mai

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

r253176 - [analyzer] Handle calling ObjC super method from inside C++ lambda.

2015-11-15 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Sun Nov 15 11:48:22 2015 New Revision: 253176 URL: http://llvm.org/viewvc/llvm-project?rev=253176&view=rev Log: [analyzer] Handle calling ObjC super method from inside C++ lambda. When calling a ObjC method on super from inside a C++ lambda, look at the captures to find "s

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

2015-11-16 Thread Devin Coughlin via cfe-commits
dcoughlin created this revision. dcoughlin added reviewers: zaks.anna, xazax.hun. dcoughlin added a subscriber: cfe-commits. The analyzer currently reports dead store false positives when a local variable is captured by reference in a C++ lambda. For example: int local = 0; auto lambda

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

r253516 - [analyzer] Skip checking blocks in dependent contexts.

2015-11-18 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Wed Nov 18 16:46:52 2015 New Revision: 253516 URL: http://llvm.org/viewvc/llvm-project?rev=253516&view=rev Log: [analyzer] Skip checking blocks in dependent contexts. Since we don't check functions in dependent contexts, we should skip blocks in those contexts as well. Thi

<    1   2   3   4   5   >