Re: [PATCH] D21506: [analyzer] Block in critical section

2016-09-19 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. This checker is now in alpha.unix, because it is new and is in active development. However, alpha checkers are not supported and are not turned on by default, so we should move it into unix package once we think it is ready to be used. Evaluation on a large real code

Re: [PATCH] D24411: [Analyzer] Suppress false positives on the clang static analyzer

2016-09-19 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. The thread from cfe-dev is called "Clang Static Analyzer: False Positive Suppression Support": http://clang-developers.42468.n3.nabble.com/Clang-Static-Analyzer-False-Positive-Suppression-Support-tt4053071.html https://reviews.llvm.org/D24411 __

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

2016-09-20 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Sorry, I do not understand the question. What are block numbers? https://reviews.llvm.org/D24759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24507: Add attribute for return values that shouldn't be cast to bool

2016-09-20 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: test/Analysis/ReturnNonBoolTest.c:67 @@ +66,3 @@ + + if (rc < 0) +// error handling How about addressing this as follows: in checkBranchCondition, you check for any comparisons of the tracked value other than comp

Re: [PATCH] D22494: [analyzer] Explain why analyzer report is not generated (fix for PR12421).

2016-09-20 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. LGTM. Thanks. https://reviews.llvm.org/D22494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r282011 - [analyzer] Add a checker that detects blocks in critical sections

2016-09-20 Thread Anna Zaks via cfe-commits
Author: zaks Date: Tue Sep 20 15:28:50 2016 New Revision: 282011 URL: http://llvm.org/viewvc/llvm-project?rev=282011&view=rev Log: [analyzer] Add a checker that detects blocks in critical sections This checker should find the calls to blocking functions (for example: sleep, getc, fgets,read,recv

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

2016-09-21 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. > However, the assert here has a reason: we clearly shouldn't be trying to > analyze synthesized bodies as top-level functions. Yes, seems like we should update r264687 so that we use the available body when analyzing as top level. Another possible issue is that we

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

2016-09-21 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Can you give a bit more context? Do you see the crash on a redefinition of the OSAtomicCompareAndSwapPtr or one of the other standard functions or do you have another similarly named function that should not be modeled? Repository: rL LLVM https://reviews.llvm.org

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

2016-09-21 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. One approach would be to skip analyzing the functions which we model as top level. - a/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp +++ b/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp @@ -688,6 +688,9 @@ void AnalysisConsumer::ActionExprEngine(Decl *D, bool Ob

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

2016-09-23 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Thanks! @alexshap, Do yon have commit access or should we commit on your behalf? Repository: rL LLVM https://reviews.llvm.org/D24792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

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

2016-09-23 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Here are more comments. Could you address/answer these and upload the latest patch that compares NSNumber to other numbers? Thanks! Comment at: lib/StaticAnalyzer/Checkers/BoolConversionChecker.cpp:88 @@ +87,3 @@ + +auto NSNumberExprM = +

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

2016-09-27 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. I have no further comments. https://reviews.llvm.org/D24278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

Re: [PATCH] D24916: [analyzer] Extend bug reports with extra notes - CloneChecker

2016-09-27 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: test/Analysis/copypaste/functions.cpp:7 @@ -6,3 +6,3 @@ -int max(int a, int b) { // expected-warning{{Detected code clone.}} +int max(int a, int b) { // expected-warning{{Clone of this code was detected}} log(); "w

Re: [PATCH] D24915: [analyzer] Extend bug reports with extra notes - ObjCDeallocChecker

2016-09-27 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. LGTM and Devin's comments have been addressed. https://reviews.llvm.org/D24915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

Re: [PATCH] D24916: [analyzer] Extend bug reports with extra notes - CloneChecker

2016-09-28 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: test/Analysis/copypaste/suspicious-clones.cpp:61 @@ -60,3 +60,3 @@ b /= a + b; - c -= b * a; // expected-warning{{suspicious code clone detected; did you mean to use 'a'?}} + c -= b * a; // expected-warning{{Suspicious code clone

Re: [PATCH] D24916: [analyzer] Extend bug reports with extra notes - CloneChecker

2016-09-28 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: test/Analysis/copypaste/macros.cpp:8 @@ -7,3 +7,3 @@ -int foo(int a) { // expected-warning{{Detected code clone.}} +int foo(int a) { // expected-warning{{Clones of this code were detected}} a = a + 1; - Duplicate c

Re: [PATCH] D24916: [analyzer] Extend bug reports with extra notes - CloneChecker

2016-09-28 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: test/Analysis/copypaste/suspicious-clones.cpp:61 @@ -60,3 +60,3 @@ b /= a + b; - c -= b * a; // expected-warning{{suspicious code clone detected; did you mean to use 'a'?}} + c -= b * a; // expected-warning{{Suspicious code clone

[PATCH] D24916: [analyzer] Extend bug reports with extra notes - CloneChecker

2016-09-30 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D24916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D25092: [analyzer] Add "Assuming..." diagnostic pieces for short-circuit logical operators.

2016-09-30 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Looks good overall. Very minor nits. > BugReporterVisitors.cpp:1274 > > + // In the code below, Term is a CFG terminator, and Cond is a branch > + // condition expression upon which the decision is made on this terminator. nit: no comma before "and". > BugReport

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

2016-10-04 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Should this revision be closed? https://reviews.llvm.org/D23853 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r283253 - [analyzer] Add PostStmt callback for ArraySubscriptExpr

2016-10-04 Thread Anna Zaks via cfe-commits
Author: zaks Date: Tue Oct 4 15:49:31 2016 New Revision: 283253 URL: http://llvm.org/viewvc/llvm-project?rev=283253&view=rev Log: [analyzer] Add PostStmt callback for ArraySubscriptExpr A patch by Jan Smets! Differential Revision: https://reviews.llvm.org/D25009 Modified: cfe/trunk/lib/Sta

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

2016-10-06 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Daniel, please, add reviewers to this patch. Repository: rL LLVM https://reviews.llvm.org/D25326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-10-07 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. Please, fix the style issues before committing. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:266 +ExplodedNode *Pred, +const ReturnSt

[PATCH] D25429: [analyzer] Link libStaticAnalyzerCheckers to libASTMatchers.

2016-10-10 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. I am in support of this as well. https://reviews.llvm.org/D25429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25503: [analyzer] Remove superquadratic behaviour from DataflowWorklist

2016-10-12 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Do you have results that show how this effects performance on average code and machine generated code? One concern is that multiset is malloc intensive. See http://llvm.org/docs/ProgrammersManual.html#picking-the-right-data-structure-for-a-task. Maybe SparseSet/Spars

[PATCH] D25503: [analyzer] Remove superquadratic behaviour from DataflowWorklist

2016-10-12 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. LGTM! I would add info on how much speedup you see in the cryptographic libraries to the commit message. (You could say something like "on a cryptographic library that uses code generat

[PATCH] D1805: [scan-build] Whitelist all -fXXXX options.

2016-10-12 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Please, provide more information on why this patch is needed and why the existing processing of the -f flags does not work as expected. Looks like the last modifications to the -f flags were made in r186138. (Please, submit patches with more context: http://llvm.org/

[PATCH] D1805: [scan-build] Whitelist all -fXXXX options.

2016-10-12 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Just realized that this is super old and has probably been fixed by r186138. Closing. https://reviews.llvm.org/D1805 ___ cfe-commits maili

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

2016-10-12 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Ping? Is there something blocking progress here? This functionality is very useful and almost done. Thanks! https://reviews.llvm.org/D20811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

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

2016-10-12 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added inline comments. This revision is now accepted and ready to land. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:479 + InPackage, + HelpText<"Check for erroneous conversions of number pointers into numbers">, + D

[PATCH] D25606: alpha.core.UnreachableCode - don't warn about unreachable code inside macro

2016-10-14 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. We should pattern match for this specific macro pattern (ex: do{...}while(0) ) instead of suppressing all warnings coming from macros. Maybe we could use the same heuristic as -Wunreachable-code-return compiler warning? Repository: rL LLVM https://reviews.llvm.org

Re: r311182 - [analyzer] Fix modeling of constructors

2017-08-21 Thread Anna Zaks via cfe-commits
I approve.Thanks Hans! Anna > On Aug 21, 2017, at 1:05 PM, Hans Wennborg wrote: > > I'm ok with it if Anna approves. > > On Mon, Aug 21, 2017 at 9:06 AM, Artem Dergachev wrote: >> Hello, >> >> Do we have time to merge this change into release 5.0.0? It's an assertion >> failure fix, which show

r318567 - Change code owner for Clang Static Analyzer to Devin Coughlin.

2017-11-17 Thread Anna Zaks via cfe-commits
Author: zaks Date: Fri Nov 17 15:19:04 2017 New Revision: 318567 URL: http://llvm.org/viewvc/llvm-project?rev=318567&view=rev Log: Change code owner for Clang Static Analyzer to Devin Coughlin. Differential Revision: https://reviews.llvm.org/D39964 Modified: cfe/trunk/CODE_OWNERS.TXT Modifi

r289883 - [analyzer] Include type name in Retain Count Checker diagnostics

2016-12-15 Thread Anna Zaks via cfe-commits
Author: zaks Date: Thu Dec 15 16:55:03 2016 New Revision: 289883 URL: http://llvm.org/viewvc/llvm-project?rev=289883&view=rev Log: [analyzer] Include type name in Retain Count Checker diagnostics The more detailed diagnostic will make identifying which object the diagnostics refer to easier. Dif

r289885 - [analyzer] Refine the diagnostics in the nullability checker to differentiate between nil and null

2016-12-15 Thread Anna Zaks via cfe-commits
Author: zaks Date: Thu Dec 15 16:55:15 2016 New Revision: 289885 URL: http://llvm.org/viewvc/llvm-project?rev=289885&view=rev Log: [analyzer] Refine the diagnostics in the nullability checker to differentiate between nil and null This is a big deal for ObjC, where nullability annotations are ext

r289884 - [analyzer] Refer to macro names in diagnostics for macros representing a literal

2016-12-15 Thread Anna Zaks via cfe-commits
Author: zaks Date: Thu Dec 15 16:55:11 2016 New Revision: 289884 URL: http://llvm.org/viewvc/llvm-project?rev=289884&view=rev Log: [analyzer] Refer to macro names in diagnostics for macros representing a literal When a macro expending to a literal is used in a comparison, use the macro name in th

r289886 - [analyzer] Teach the analyzer that pointers can escape into __cxa_demangle

2016-12-15 Thread Anna Zaks via cfe-commits
Author: zaks Date: Thu Dec 15 16:55:18 2016 New Revision: 289886 URL: http://llvm.org/viewvc/llvm-project?rev=289886&view=rev Log: [analyzer] Teach the analyzer that pointers can escape into __cxa_demangle This fixes a reported false positive in the malloc checker. Differential Revision: https:/

r289887 - [asan][docs] Fix the documentation to use clang++ for the C++ example

2016-12-15 Thread Anna Zaks via cfe-commits
Author: zaks Date: Thu Dec 15 16:55:21 2016 New Revision: 289887 URL: http://llvm.org/viewvc/llvm-project?rev=289887&view=rev Log: [asan][docs] Fix the documentation to use clang++ for the C++ example After Darwin has been updated not to link in stdc++ on Darwin this actually started to break. D

Re: [PATCH] D22090: [analyzer] Add more FileIDs to PlistDiagnostic map

2016-08-23 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Thanks! https://reviews.llvm.org/D22090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

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

2016-08-26 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. In https://reviews.llvm.org/D23853#524945, @xazax.hun wrote: > > Also: I think r270511 is unlikely to be the change that caused this -- that > > is a change in LLVM's treatment of DebugInfo, which shouldn't affect the > > analyzer. > > > I think Peter means that, that

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-08-31 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. -nostdlib is often used to build parts of libsystem. It's worth noting that ASan and TSan are not supported for use on libsystem on darwin (and elsewhere?), though some subcomponents of it can be sanitized. I am not sure how this relates to UBSan. The user experience

Re: [PATCH] D22494: [analyzer] Explain why analyzer report is not generated (fix for PR12421).

2016-08-31 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:216 @@ +215,3 @@ +llvm::raw_svector_ostream warning(buf); +warning << "warning: Path diagnostic report is not generated. Current " +<< "output format does not support diagno

Re: [PATCH] D22494: [analyzer] Explain why analyzer report is not generated (fix for PR12421).

2016-08-31 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:216 @@ +215,3 @@ +llvm::raw_svector_ostream warning(buf); +warning << "warning: Path diagnostic report is not generated. Current " +<< "output format does not support diagno

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-01 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. I've added kcc as a reviewer to see what his opinion is. The way I see this, is that the sanitizer flags and the -nodefaultlibs and -nostdlib flags are not fully compatible since sanitizers will not work for some users who explicitly pass the "-no*" flags. libcxx hap

Re: [PATCH] D24307: calculate extent size for memory regions allocated by C++ new expression

2016-09-07 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1003 @@ +1002,3 @@ +// +ProgramStateRef MallocChecker::addExtentSize(CheckerContext &C, + const CXXNewExpr *NE, I am not sure thi

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-07 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. > -fsanitize=* as a driver argument *when linking* is an explicit request to > link against the sanitizer runtimes. Sanitizer users pass this option to the clang driver to get the runtime checking. Not all of them understand the implications and immediately realize

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-08 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. > I don't see the point of adding another flag to control this when we already > have a perfectly good set of > flags that already do the right thing -- that takes us three levels deep in > flags overriding the behavior of > other flags, and I don't see how it ac

Re: [PATCH] D24307: calculate extent size for memory regions allocated by C++ new expression

2016-09-08 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1003 @@ +1002,3 @@ +// +ProgramStateRef MallocChecker::addExtentSize(CheckerContext &C, + const CXXNewExpr *NE, NoQ wrote: > dkru

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

2016-09-09 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Thanks! Looks good overall. Several comments below. Comment at: lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp:160 @@ +159,3 @@ +[](const IntrusiveRefCntPtr &p) { + return isa(p.get()); +}); --

Re: [PATCH] D23300: [analyzer] Add "Assuming..." diagnostic pieces for unsupported condition expressions.

2016-09-12 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. @NoQ, Let's test in an IDE. Can you send screenshots? https://reviews.llvm.org/D23300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-09-12 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Let's test it on more real word bugs. Comment at: lib/StaticAnalyzer/Checkers/BoolConversionChecker.cpp:11 @@ +10,3 @@ +// This file defines BoolConversionChecker, which checks for a particular +// common mistake when dealing with NSNumber and OSBoolea

Re: [PATCH] D24484: [analyzer] Fix ExprEngine::VisitMemberExpr

2016-09-13 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Thanks! Do you have commit access? Repository: rL LLVM https://reviews.llvm.org/D24484 ___ cfe-commits mailing list cfe-commits@lists.l

Re: [PATCH] D21506: [analyzer] Block in critical section

2016-09-14 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Do you have commit access or should we commit? Repository: rL LLVM https://reviews.llvm.org/D21506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21506: [analyzer] Block in critical section

2016-09-14 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Future steps: How do we plan to bring this checker out of alpha? Have you evaluated it on large codebases? Repository: rL LLVM https://reviews.llvm.org/D21506 _

Re: [PATCH] D24507: Add attribute for return values that shouldn't be cast to bool

2016-09-15 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: include/clang/Basic/AttrDocs.td:2055 @@ -2054,1 +2054,3 @@ } +def WarnImpcastToBoolDocs : Documentation { + let Category = DocCatFunction; You probably need to "propose" the attribute to the clang community. I'd send

Re: [PATCH] D24411: [Analyzer] Suppress false positives on the clang static analyzer

2016-09-16 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. It is not clear to me that we've reached a consensus on cfe-dev list that suppressing with comments and printing the checker name is the way to go. https://reviews.llvm.org/D24411 ___ cfe-commits mailing list cfe-commits@

Re: [PATCH] D24307: calculate extent size for memory regions allocated by C++ new expression

2016-09-16 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. I do not have any more comments; however, let's wait for @NoQ to review this as well. Thanks! https://reviews.llvm.org/D24307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

r291869 - [analyzer] Add LocationContext as a parameter to checkRegionChanges

2017-01-12 Thread Anna Zaks via cfe-commits
Author: zaks Date: Thu Jan 12 18:50:57 2017 New Revision: 291869 URL: http://llvm.org/viewvc/llvm-project?rev=291869&view=rev Log: [analyzer] Add LocationContext as a parameter to checkRegionChanges This patch adds LocationContext to checkRegionChanges and removes wantsRegionChangeUpdate as it wa

r291866 - [analyzer] Fix false positives in Keychain API checker

2017-01-12 Thread Anna Zaks via cfe-commits
Author: zaks Date: Thu Jan 12 18:50:41 2017 New Revision: 291866 URL: http://llvm.org/viewvc/llvm-project?rev=291866&view=rev Log: [analyzer] Fix false positives in Keychain API checker The checker has several false positives that this patch addresses: - Do not check if the return status has been

r291868 - [tsan] Do not report errors in __destroy_helper_block_

2017-01-12 Thread Anna Zaks via cfe-commits
Author: zaks Date: Thu Jan 12 18:50:50 2017 New Revision: 291868 URL: http://llvm.org/viewvc/llvm-project?rev=291868&view=rev Log: [tsan] Do not report errors in __destroy_helper_block_ There is a synchronization point between the reference count of a block dropping to zero and it's destruction,

r291867 - [analyzer] Support inlining of '[self classMethod]' and '[[self class] classMethod]'

2017-01-12 Thread Anna Zaks via cfe-commits
Author: zaks Date: Thu Jan 12 18:50:47 2017 New Revision: 291867 URL: http://llvm.org/viewvc/llvm-project?rev=291867&view=rev Log: [analyzer] Support inlining of '[self classMethod]' and '[[self class] classMethod]' Differential Revision: https://reviews.llvm.org/D28495 Modified: cfe/trunk/

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

2017-01-23 Thread Anna Zaks via cfe-commits
Yes, ok to merge! Thank you. Sent from my iPhone > On Jan 23, 2017, at 1:50 PM, Hans Wennborg wrote: > > Sounds good to me. > > Anna, you're the code owner here. Ok to merge this? > > Thanks, > Hans > >> On Mon, Jan 23, 2017 at 10:37 AM, Artem Dergachev >> wrote: >> Hans, >> >> Could we m

Re: r293043 - [analyzer] Fix MacOSXAPIChecker fp with static locals seen from nested blocks.

2017-02-03 Thread Anna Zaks via cfe-commits
Fine with merging. Thank you! Anna. > On Feb 1, 2017, at 11:00 AM, Hans Wennborg wrote: > > If Anna is Ok with it, I'm fine with merging. > > Thanks, > Hans > > On Wed, Feb 1, 2017 at 10:29 AM, Artem Dergachev wrote: >> Hans, >> >> This is a fixed and tested version of the previously-merged-a

Re: [PATCH] D29303: In VirtualCallChecker, handle indirect calls

2017-02-25 Thread Anna Zaks via cfe-commits
Thank you! On Friday, February 24, 2017, Hans Wennborg wrote: > Yes, this looks very straight-forward. Merged in r296154. > > On Fri, Feb 24, 2017 at 4:29 AM, Sam McCall via cfe-commits > > wrote: > > Thanks Anna, I'm new to the release process here. > > > > Hans: this is a simple fix for a null

r297324 - [analyzer] Add bug visitor for taint checker.

2017-03-08 Thread Anna Zaks via cfe-commits
Author: zaks Date: Wed Mar 8 18:01:07 2017 New Revision: 297324 URL: http://llvm.org/viewvc/llvm-project?rev=297324&view=rev Log: [analyzer] Add bug visitor for taint checker. Add a bug visitor to the taint checker to make it easy to distinguish where the tainted value originated. This is especi

r297325 - [analyzer] Improve usability of ExprInspectionChecker

2017-03-08 Thread Anna Zaks via cfe-commits
Author: zaks Date: Wed Mar 8 18:01:10 2017 New Revision: 297325 URL: http://llvm.org/viewvc/llvm-project?rev=297325&view=rev Log: [analyzer] Improve usability of ExprInspectionChecker Some of the magic functions take arguments of arbitrary type. However, for semantic correctness, the compiler st

r297323 - [analyzer] Teach the MallocChecker about about Glib API

2017-03-08 Thread Anna Zaks via cfe-commits
Author: zaks Date: Wed Mar 8 18:01:01 2017 New Revision: 297323 URL: http://llvm.org/viewvc/llvm-project?rev=297323&view=rev Log: [analyzer] Teach the MallocChecker about about Glib API A patch by Leslie Zhai! Differential Revision: https://reviews.llvm.org/D28348 Added: cfe/trunk/test/Ana

r297326 - [analyzer] Extend taint propagation and checking to support LazyCompoundVal

2017-03-08 Thread Anna Zaks via cfe-commits
Author: zaks Date: Wed Mar 8 18:01:16 2017 New Revision: 297326 URL: http://llvm.org/viewvc/llvm-project?rev=297326&view=rev Log: [analyzer] Extend taint propagation and checking to support LazyCompoundVal A patch by Vlad Tsyrklevich! Differential Revision: https://reviews.llvm.org/D28445 Modi

r297429 - [analyzer] Turn suppress-c++-stdlib on by default

2017-03-09 Thread Anna Zaks via cfe-commits
Author: zaks Date: Thu Mar 9 18:33:19 2017 New Revision: 297429 URL: http://llvm.org/viewvc/llvm-project?rev=297429&view=rev Log: [analyzer] Turn suppress-c++-stdlib on by default We have several reports of false positives coming from libc++. For example, there are reports of false positives in

[PATCH] D26588: Add LocationContext to members of check::RegionChanges

2016-11-14 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Hi and welcome to the project! This patch definitely looks quite complex for a first contribution, so great job at digging through the analyzer internals! One higher level comment I have is that you should try and split patches whenever possible. For example, in the

[PATCH] D26588: Add LocationContext to members of check::RegionChanges

2016-11-15 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: include/clang/StaticAnalyzer/Core/Checker.h:325 + const CallEvent *Call, + const LocationContext *LCtx) { +return ((const CHECKER *) checker)->checkRegionChanges(state, invalidated, ---

[PATCH] D26759: Remove unused check::RegionChanges::wantsRegionChangeUpdate callback

2016-11-16 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Looks great! https://reviews.llvm.org/D26759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[PATCH] D26759: Remove unused check::RegionChanges::wantsRegionChangeUpdate callback

2016-11-16 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Core/CheckerManager.cpp:535 + ExplicitRegions, Regions, + Call, LCtx); } Looks like the other patch leaked i

r287175 - [analyzer] Remove unused check::RegionChanges::wantsRegionChangeUpdate callback

2016-11-16 Thread Anna Zaks via cfe-commits
Author: zaks Date: Wed Nov 16 16:59:01 2016 New Revision: 287175 URL: http://llvm.org/viewvc/llvm-project?rev=287175&view=rev Log: [analyzer] Remove unused check::RegionChanges::wantsRegionChangeUpdate callback Remove the check::RegionChanges::wantsRegionChangeUpdate callback as it is no longer u

[PATCH] D26773: [analyzer] Refactor recursive symbol reachability check to use symbol_iterator

2016-11-16 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Thank you for the cleanup!!! For bonus points, please add comments to the class APIs:) https://reviews.llvm.org/D26773 ___ cfe-commits mai

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-11-17 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:423 + +void IteratorPastEndChecker::handleComparison(CheckerContext &C, + const SVal &LVal, baloghadamsoftware wrote:

[PATCH] D26588: Add LocationContext to members of check::RegionChanges

2016-11-17 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: include/clang/StaticAnalyzer/Core/Checker.h:325 + const CallEvent *Call, + const LocationContext *LCtx) { +return ((const CHECKER *) checker)->checkRegionChanges(state, invalidated, ---

[PATCH] D25606: alpha.core.UnreachableCode - don't warn about unreachable code inside macro

2016-10-17 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. LGTM. Thank you! Repository: rL LLVM https://reviews.llvm.org/D25606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://list

[PATCH] D25663: [analyzer] Update alpha and potential checker documentation, esp. alpha.valist

2016-10-17 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Thank you for the cleanup! Anna. https://reviews.llvm.org/D25663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

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

2016-10-18 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp:72 assert(Conv); - const Expr *Osboolean = Result.Nodes.getNodeAs("osboolean"); - const Expr *Nsnumber = Result.Nodes.getNodeAs("nsnumber"); - bool IsObjC = (bool)Nsnu

[PATCH] D25596: alpha.core.Conversion - Fix false positive for 'U32 += S16; ' expression, that is not unsafe

2016-10-18 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Looks like you've also added handling of Xor, Or , Div, and Rem. Should there be tests for those? Repository: rL LLVM https://reviews.llvm.org/D25596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

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

2016-10-20 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp:111 + QualType ObjT = (IsCpp || IsObjC) + ? Obj->getType().getCanonicalType().getUnqualifiedType() + : Obj->getType(); ---

[PATCH] D25857: [tsan] Introduce a function attribute to disable TSan checking at run time

2016-10-20 Thread Anna Zaks via cfe-commits
zaks.anna created this revision. zaks.anna added reviewers: kcc, kubabrecka, dvyukov. zaks.anna added a subscriber: cfe-commits. This introduces a function annotation that disables TSan checking for the function at run time. The benefit over __attribute__((no_sanitize("thread"))) is that the acc

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

2016-10-21 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: test/Analysis/number-object-conversion.c:14 + if (p) {} // expected-warning{{Converting 'CFNumberRef' to a plain boolean value for branching; please compare the pointer to NULL instead to suppress this warning}} + if (!p) {} // exp

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

2016-10-21 Thread Anna Zaks via cfe-commits
zaks.anna created this revision. zaks.anna added reviewers: dcoughlin, NoQ. zaks.anna added subscribers: cfe-commits, rgov. This patch contains 2 improvements to the CFNumber checker: - Checking of CFNumberGetValue misuse. - Treating all CFNumber API misuse errors as non-fatal. (Previously we tre

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

2016-10-21 Thread Anna Zaks via cfe-commits
zaks.anna updated this revision to Diff 75488. zaks.anna added a comment. Address comments from Devin. https://reviews.llvm.org/D25876 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp test/Analysis/CFNumber.c Index: test/A

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

2016-10-24 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Looks good overall! https://reviews.llvm.org/D25909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-10-24 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Minor nit below. Thanks for iterating so much on this! Anna. Comment at: test/Analysis/number-object-conversion.cpp:46 +#ifdef PEDANTIC + if (p) {} // expected-warnin

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

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

[PATCH] D25985: [analyzer] Export coverage information from the analyzer.

2016-10-26 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Please, add multi-file tests and tests where a line is covered more than once. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:262 + +static void dumpCoverageInfo(llvm::SmallVectorImpl &Path, + SourceManager &SM) { -

[PATCH] D25985: [analyzer] Export coverage information from the analyzer.

2016-10-26 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:274 +if (Invalid) + continue; +std::ofstream OutFile(FilePath.c_str()); zaks.anna wrote: > Would it be better to break if the buffer is invalid? > Should this be hois

r285253 - [analyzer] Report CFNumberGetValue API misuse

2016-10-26 Thread Anna Zaks via cfe-commits
Author: zaks Date: Wed Oct 26 17:51:47 2016 New Revision: 285253 URL: http://llvm.org/viewvc/llvm-project?rev=285253&view=rev Log: [analyzer] Report CFNumberGetValue API misuse This patch contains 2 improvements to the CFNumber checker: - Checking of CFNumberGetValue misuse. - Treating all CFNu

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

2016-10-27 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Looks great! Please, commit. https://reviews.llvm.org/D25909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-10-27 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. >> Actually, I always test first on real code, and it seemed to be inlined. But >> now, even if I >> removed the pragma it was not inlined. Looks like this patch is interfering with this inlining suppression. We had many false positives without it. Mainly, the analy

r285349 - [docs] Update the TSan and MSan docs to refer to the new no_sanitize attribute

2016-10-27 Thread Anna Zaks via cfe-commits
Author: zaks Date: Thu Oct 27 16:38:44 2016 New Revision: 285349 URL: http://llvm.org/viewvc/llvm-project?rev=285349&view=rev Log: [docs] Update the TSan and MSan docs to refer to the new no_sanitize attribute TSan and MSan were the only remaining sanitizers referring to the deprecated attribute

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

2016-10-28 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. How about this imperfect solution that will work quite well in practice? For the ssize_t case, where type size cannot be used, we check the function name, # of arguments , and check that the functions are coming from the system header. https://reviews.llvm.org/D25940

[PATCH] D25857: [tsan][clang] Introduce a function attribute to disable TSan checking at run time

2016-10-31 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Thanks for the review! I'll submit the updated patches soon. https://reviews.llvm.org/D25857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25857: [tsan][clang] Introduce a function attribute to disable TSan checking at run time

2016-11-01 Thread Anna Zaks via cfe-commits
zaks.anna updated this revision to Diff 76643. zaks.anna added a comment. Addressed the review comments. I also added ObjC +initialize method to the list because TSan does not observe the guaranteed synchronization between +initialize and initial object accesses. https://reviews.llvm.org/D2585

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

2016-11-01 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Please, explain what variants are for in comments. https://reviews.llvm.org/D25940 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-11-02 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. LGTM other than the missing explanation in comments. https://reviews.llvm.org/D25940 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

  1   2   3   4   >