[PATCH] D158071: [clang] Remove rdar links; NFC

2023-08-28 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Looks like @NoQ wetted the remaining code changes. The rest LGTM. Thank you for preparing the patch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D40668: [Blocks] Inherit sanitizer options from parent decl

2017-12-07 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. LGTM. Thanks! I was wondering if there are other places where this propagation needs to be added, for example, other calls to GenerateBlockFunction. https://reviews.llvm.org/D40668

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

2017-11-17 Thread Anna Zaks via cfe-commits
obeynikov E: an...@korobeynikov.info D: Exception handling, Windows codegen, ARM EABI -N: Anna Zaks -E: ga...@apple.com -D: Clang Static Analyzer - N: John McCall E: rjmcc...@apple.com D: Clang LLVM IR generation ___ cfe-commits mailing list cfe-commit

[PATCH] D39964: Change code owner for Clang Static Analyzer to Devin Coughlin.

2017-11-13 Thread Anna Zaks via Phabricator via cfe-commits
ndows codegen, ARM EABI -N: Anna Zaks -E: ga...@apple.com -D: Clang Static Analyzer - N: John McCall E: rjmcc...@apple.com D: Clang LLVM IR generation Index: CODE_OWNERS.TXT === --- CODE_OWNERS.TXT +++ CODE_OWNERS.TXT @@ -25,6 +

[PATCH] D39428: [Analyzer] As suggested, use value storage for BodyFarm

2017-10-31 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > Also if you check the code snippets in the coding standard: > https://llvm.org/docs/CodingStandards.html#beware-unnecessary-copies-with-auto > you can see that where we officially put the references. Correct! The reference should not go with the type name. George, p

[PATCH] D38844: [analyzer] Make issue hash related tests more concise

2017-10-30 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. I'd also include some info on how it's now possible to dump the issue hash. You introduce a new debugging function here "clang_analyzer_hashDump" but it's not mentioned in the commit message. Thanks! Comment at: lib/StaticAnalyzer/Checkers/ExprInsp

[PATCH] D39269: [Analyzer] [Tests] Do not discard output from CmpRuns.py when running integration tests

2017-10-27 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. What kind of output will this start displaying? (I believe currently the script does print the summary of the objects that are added or deleted.) https://reviews.llvm.org/D39269 ___

[PATCH] D38728: [analyzer] Use the signature of the primary template for issue hash calculation

2017-10-27 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. LGTM! https://reviews.llvm.org/D38728 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38844: [analyzer] Make issue hash related tests more concise

2017-10-27 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Please, change the commit description to be more comprehensive. Comment at: lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp:68 // (globals should not be invalidated, etc), hence the use of evalCall. - FnCheck Handler = llvm::StringSwitch(C.g

[PATCH] D37437: [analyzer] Fix some checker's output plist not containing the checker name

2017-10-27 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Just to be clear, since this leads to regression to the checker API, I am asking to look into other ways of solving this problem. For example, is there a way to ensure that the checker names are set at construction? https://reviews.llvm.org/D37437

[PATCH] D38674: [analyzer] MisusedMovedObjectChecker: More precise warning message

2017-10-27 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Please, commit. https://reviews.llvm.org/D38674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

2017-10-20 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:651-652 + } else if (StoreSite->getLocation().getAs()) { +os << "Reach the max loop limit."; +os << " Assigning a conjured symbol"; +if (R->canPrintPretty()) { --

[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

2017-10-19 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:651-652 + } else if (StoreSite->getLocation().getAs()) { +os << "Reach the max loop limit."; +os << " Assigning a conjured symbol"; +if (R->canPrintPretty()) { --

[PATCH] D37437: [analyzer] Fix some checker's output plist not containing the checker name

2017-10-13 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Looks like the need to have the checker name in BugType along with the checker names not being initialized early enough, leads to worse checker-writer experience. Is there a way to ensure that the checker names are set at construction? Comment at:

[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

2017-10-10 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. Once the comments by @paquette are addressed, LGTM. Thanks! Comment at: lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp:138 + +OS << " larger or equal to the width of type '" + << B->getLHS()->get

[PATCH] D36737: [analyzer] Store design discussions in docs/analyzer for future use.

2017-09-25 Thread Anna Zaks via Phabricator 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/D36737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

2017-09-25 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp:134 +else if (I->isUnsigned()) + OS << I->getZExtValue() << ", which is"; +else Please print single quotes around the value. ===

[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

2017-09-25 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Sorry for the wait! Repository: rL LLVM https://reviews.llvm.org/D30295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37806: [analyzer] PthreadLock: Fix return values of XNU lock functions.

2017-09-13 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp:271 } -assert(lockFail && lockSucc); -C.addTransition(lockFail); - +// We might want to handle the case when the mutex lock function was inlined +// and returned

[PATCH] D37809: [analyzer] PthreadLock: Refactor, use PostCall API. NFC.

2017-09-13 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. How about committing the refactor of the code without test modifications. And committing changes to the test separately? https://reviews.llvm.org/D37809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D37400: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-06 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Thank you! Anna https://reviews.llvm.org/D37400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D37400: [StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode

2017-09-06 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Thanks for addressing the non-determinism!!! The ExplodedNodeSet is predominantly used to hold very small sets and it is used quite a bit in the analyzer. Maybe we could we use SmallSetVector here instead? https://reviews.llvm.org/D37400 _

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-08-28 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > But I've never used the taint tracking mode, so I don't know what would be a > reasonable default for MaxComp. that one is very experimental anyway. I'd just keep the functional changes to tain out of this patch and use the current default that taint uses. https:/

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2017-08-28 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Is this blocked on the same reasons as what was raised in https://reviews.llvm.org/D35109? https://reviews.llvm.org/D35110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-08-27 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Core/SValBuilder.cpp:364 if (symLHS && symRHS && - (symLHS->computeComplexity() + symRHS->computeComplexity()) < MaxComp) + (symLHS->computeComplexity() + symRHS->computeComplexity()) < MaxComp) re

[PATCH] D37103: [StaticAnalyzer] LoopUnrolling fixes

2017-08-27 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Core/AnalyzerOptions.cpp:190 + /* Default = */ false); + return shouldUnrollLoops() || explicitlyIncludeLoopExit; } I would rather keep this method

[PATCH] D36737: [analyzer] Store design discussions in docs/analyzer for future use.

2017-08-27 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. I think we should have these is .rst format as this is what the rest of the documentation predominantly uses. (Note, the formatting can be very basic, it's the format that I care about.) Otherwise, great to see this addition! https://reviews.llvm.org/D36737 _

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-08-25 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Core/SValBuilder.cpp:364 if (symLHS && symRHS && - (symLHS->computeComplexity() + symRHS->computeComplexity()) < MaxComp) + (symLHS->computeComplexity() + symRHS->computeComplexity()) < MaxComp) re

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

[PATCH] D27918: [analyzer] OStreamChecker

2017-08-20 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/OStreamFormatChecker.cpp:513 + +bool OStreamFormatChecker::evalCall(const CallExpr *CE, +CheckerContext &C) const { gamesh411 wrote: > NoQ wrote: > > One

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-08-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > What do you suggest? Should we widen the type of the difference, or abandon > this patch and revert back to the local solution I originally used in the > iterator checker? Does the local solution you used in the iterator checker not have the same problem? https:/

[PATCH] D36067: [analyzer] Create infrastructure for organizing and declaring analyzer configs.

2017-08-01 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. >> I tried to keep this as a minimal starting example because this currently >> blocks @yamaguchi 's GSoC project for bash completion. There we want to >> complete the values for -analyzer-config and we currently don't have a good >> way to get a complete list of av

[PATCH] D34508: [Analyzer] Bug Reporter Visitor to Display Values of Variables - PRELIMINARY!

2017-06-28 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. I agree that we should not print the values of all variables. The users will be overwhelmed with the huge amount of information. It is very valuable to highlight just the right information. (I believe even the current diagnostics often produce too much info and highli

[PATCH] D16403: Add scope information to CFG

2017-06-26 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > @dcoughlin As a reviewer of both patches - could you tell us what's the > difference between them? And how are we going to resolve this issue? Unfortunately, @dcoughlin is on vacation this week; should be back next week. Repository: rL LLVM https://reviews.llvm.

[PATCH] D34102: [analyzer] Add portability package for the checkers.

2017-06-22 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. This just supports the statement that this particular check should not go under unix. I understand that it will be inconsistent with the name of the malloc checker, which we probably should not change as people might be relying on the package names. I think it's bette

[PATCH] D34266: Static Analyzer - Localizability Checker: New Localizable APIs for macOS High Sierra & iOS 11

2017-06-20 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > Hmm, should there be new tests that demonstrate that we cover the new APIs? Unless we use a new registration mechanism for some of these APIs, I'd be fine without adding a test for every API that has localization constraints. Repository: rL LLVM https://reviews.

[PATCH] D34277: [analyzer] Bump default performance thresholds?

2017-06-20 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > In particular, there are patches to generate more symbolic expressions, that > could also degrade the performance (but fix some fixmes along the way). The patch you are talking about might be promising, but needs much more investigation and tuning for performance vs

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-06-17 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Core/SValBuilder.cpp:356 QualType ResultTy) { - if (!State->isTainted(RHS) && !State->isTainted(LHS)) -return UnknownVal(); ddcc wrote: > zaks.anna wrote: > >

[PATCH] D30406: [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output

2017-06-16 Thread Anna Zaks via Phabricator 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! (Not sure if @NoQ wants to do a final review.) Do you have commit access or should we commit on your behalf? https://reviews.llvm.org/D30406 ___

[PATCH] D34102: [analyzer] Add portability package for the checkers.

2017-06-16 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > eg. checkers for portability across linux/bsd should be off on windows by > default, checkers for non-portable C++ APIs should be off in plain C code, etc Is the checker you are moving to portability off and not useful on Windows? https://reviews.llvm.org/D34102

[PATCH] D34266: Static Analyzer - Localizability Checker: New Localizable APIs for macOS High Sierra & iOS 11

2017-06-16 Thread Anna Zaks via Phabricator 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/D34266 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D34277: [analyzer] Bump default performance thresholds?

2017-06-16 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Once Artem gives more details about the codebase he tested on, I think it would be fine to commit this. We can revert/address concerns later if @a.sidorin or anyone else raises concerns

[PATCH] D34277: [analyzer] Bump default performance thresholds?

2017-06-16 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > Maybe we should introduce another UMK_* for deeper analysis instead? The difference here is not substantial enough to warrant a new level. The general motivation for bumping these numbers is that we've set the timeouts many years ago and the hardware improved quite

[PATCH] D33645: [analyzer] Add missing documentation for static analyzer checkers

2017-06-16 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: www/analyzer/alpha_checks.html:91 +(C, C++) +Check for logical errors for function calls and Objective-C message +expressions (e.g., uninitialized arguments, null function pointers, szdominik wrote: > zaks.anna wrote

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-06-15 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > -(Anna) Scan-build-py integration of the functionality is nearly finished > (see https://github.com/rizsotto/scan-build/issues/83) (--ctu switch performs > both analysis phases at once). This I think could go in a different patch, > but until we could keep the ctu-b

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Core/SValBuilder.cpp:356 QualType ResultTy) { - if (!State->isTainted(RHS) && !State->isTainted(LHS)) -return UnknownVal(); I am concerned that removing the g

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Should this revision be "abandoned" or is the plan to iterate on it? Repository: rL LLVM https://reviews.llvm.org/D31320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Looks good with a nit! Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:325 + Loc makeNull() { return loc::ConcreteInt(BasicVals.getZeroWith

[PATCH] D33645: [analyzer] Add missing documentation for static analyzer checkers

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Great cleanup! Some comments below. Comment at: www/analyzer/alpha_checks.html:91 +(C, C++) +Check for logical errors for function calls and Objective-C message +expressions (e.g., uninitialized arguments, null function pointers, fo

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. This generally sounds good. Definitely do submit these changes in small pieces! See http://llvm.org/docs/DeveloperPolicy.html#incremental-development for rationale. https://reviews.llvm.org/D27753 ___ cfe-commits mailing

[PATCH] D34102: [analyzer] Add portability package for the checkers.

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:454 +def UnixAPIPortabilityChecker : Checker<"API">, + HelpText<"Finds implementation-defined behavior in UNIX/Posix functions">, + DescFile<"UnixAPIChecker.cpp">; No

[PATCH] D34102: [analyzer] Add portability package for the checkers.

2017-06-12 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:454 +def UnixAPIPortabilityChecker : Checker<"API">, + HelpText<"Finds implementation-defined behavior in UNIX/Posix functions">, + DescFile<"UnixAPIChecker.cpp">; Do

[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

2017-06-01 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. These are great additions! Going back to my comment about adding these to CheckerContext, I think we should be adding helper functions as methods on CheckerContext as it is **the primary place where checker writers look for helpers**. Two of the three methods added t

[PATCH] D33671: [analyzer] In plist alternate mode, don't add weird control flow pieces from ObjC property declarations to uses.

2017-05-31 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added inline comments. This revision is now accepted and ready to land. Comment at: lib/StaticAnalyzer/Core/BugReporter.cpp:1674 const Decl *D = CalleeLC->getDecl(); -addEdgeToPath(PD.getActivePath(), PrevLoc, -

[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-05-17 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Thanks! A couple of minor comments below. Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:699 + // We cannot place diagnostics on autosynthesized code. + // Put them onto the call site through which we jumped into autosynthesized + // code f

[PATCH] D33191: [analyzer] ObjCGenerics: account for __kindof specifiers met along a chain of casts.

2017-05-17 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp:464 ASTContext &C) { + if (hasKindofArgs(StaticUpperBound)) { +// If the upper bound type has more __kindof specs, we drop all the info,

[PATCH] D33263: [scan-build] Patch to scan-build tool to support "--target=" flag

2017-05-16 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Looks good. Thank you! Do you have commit access or should we commit? https://reviews.llvm.org/D33263 ___ cfe-commits mailing list cfe-com

[PATCH] D32449: Modifying PthreadLockChecker.cpp to reduce false positives.

2017-05-10 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Thank you for the patch! Could you please re-submit the patch with context? Instructions on how to do that can be found here: http://llvm.org/docs/Phabricator.html Repository: rL LLVM https://reviews.llvm.org/D32449 __

[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-05-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > That wouldn't work this way because we'd have the completely redundant > "calling property accessor" piece before that, and "returning..." after that. I think we should not print "calling" and "returning" for calling into and returning from autogenerated code, If we

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-05-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Sorry for the delay!!! Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:180 + inline const llvm::APSInt &getZeroWithTypeSize(QualType T, + bool isUnsigned = true) { +

[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-05-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. > These new "extra notes" of mine might be useful (we could put them at > property declaration), i could add them if everybody likes this idea. What are these? Is there a PR? It would b

[PATCH] D32702: [analyzer] Fix 'Memory Error' bugtype capitalization.

2017-05-01 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. Thanks! https://reviews.llvm.org/D32702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32291: [analyzer] Implement handling array subscript into null pointer, improve null dereference checks for array subscripts

2017-04-28 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: cfe/trunk/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:80 } -else if (isDeclRefExprToReference(E)) { +else if (isa(E)) { return E; Not sure what this does, but looks like we are stricter here now

[PATCH] D32328: [analyzer] Fix assert in ExprEngine::processSwitch

2017-04-20 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Do you have commit access? Repository: rL LLVM https://reviews.llvm.org/D32328 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32328: [analyzer] Fix assert in ExprEngine::processSwitch

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

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-04-19 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. I agree that scan-build or scan-build-py integration is an important issue to resolve here. What I envision is that users will just call scan-build and pass -whole-project as an option to it. Everything else will happen automagically:) Another concern is dumping the A

[PATCH] D31975: [Analyzer] Iterator Checkers

2017-04-19 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. @baloghadamsoftware Thanks for working on this! However, this patch is getting too big. Could you, please, split it into incremental patches so that it would be easier to review? More motivation of why this is very important is here http://llvm.org/docs/DeveloperPol

[PATCH] D31982: [analyzer] Improve suppression for inlined defensive checks when operator& is involved.

2017-04-13 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Thanks!!! Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:965 + +// Performing operator `&' on an lvalue expression is essentially a no-op. +// Then, if we are taking addresses of fields or elements, these are also

[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

2017-04-10 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h:46 -} // end GR namespace +bool isExprResultConformsComparisonRule(CheckerContext &C, +BinaryOperatorKind CompRule,

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-03-16 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Are there other cases where makeNull would need to be replaced? Repository: rL LLVM https://reviews.llvm.org/D31029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D30798: [analyzer] Turn suppress-c++-stdlib on by default

2017-03-11 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Correct, this will suppress some valid warnings that occur due to user errors and valid warnings coming from the standard library. However, I believe this is the right choice right now since we know that the analyzer is not currently effective in understanding invaria

[PATCH] D30593: Add correct "-isystem"/"-isysroot" warning handling to static analysis' BugReporter.

2017-03-11 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Thank you! Repository: rL LLVM https://reviews.llvm.org/D30593 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30762: [ubsan] Add a nullability sanitizer

2017-03-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: docs/UndefinedBehaviorSanitizer.rst:101 + ``-fsanitize=nullability-assign``, and the argument check with + ``-fsanitize=nullability-arg``. While violating nullability rules does + not result in undefined behavior, it is oft

[PATCH] D30798: [analyzer] Turn suppress-c++-stdlib on by default

2017-03-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. I've committed the change, but would very much appreciate community feedback here if if there is any! Repository: rL LLVM https://reviews.llvm.org/D30798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

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] D30593: Add correct "-isystem"/"-isysroot" warning handling to static analysis' BugReporter.

2017-03-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. @kmarshall, We are going to turn this off by default, see https://reviews.llvm.org/D30798. Please, do file a bug that lists all the issues you are seeing and desirably instructions on how to reproduce. (Please, list even the cases you are not 100% sure are false posi

[PATCH] D30798: [analyzer] Turn suppress-c++-stdlib on by default

2017-03-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna created this revision. We have several reports of false positives coming from libc++. For example, there are reports of false positives in std::regex, std::wcout, and also a bunch of issues are reported in https://reviews.llvm.org/D30593. In many cases, the analyzer trips over the com

[PATCH] D30762: [ubsan] Add a nullability sanitizer

2017-03-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: docs/UndefinedBehaviorSanitizer.rst:101 + ``-fsanitize=nullability-assign``, and the argument check with + ``-fsanitize=nullability-arg``. While violating nullability rules does + not result in undefined behavior, it is oft

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2017-03-08 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > All this leads to the need of several types of taintednesses (string > taintedness, array taintedness, general bound check taintedness) because the > cleansing can only take down one type of taintedness at a time. That would be > the only way for a checker to be abl

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

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

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

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

2017-03-08 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Thi has been committed in r290505. https://reviews.llvm.org/D22862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-03-07 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. @vlad.tsyrklevich, Do you have commit access or should we commit on your behalf? https://reviews.llvm.org/D28445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D30489: [analyzer] catch out of bounds for VLA

2017-03-06 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna requested changes to this revision. zaks.anna added a comment. This revision now requires changes to proceed. Following Gabor's suggestion, we should investigate if ArrayBoundCheckerV2 supports this. If not it's possible that we are hitting the Constraint Solver limitations. Reposito

[PATCH] D27092: Add RecursionChecker for finding infinite recursion

2017-03-06 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. This is waiting for a resolution on a CallEvent API patch as described in https://reviews.llvm.org/D27091. This is blocked on https://reviews.llvm.org/D27091. Comment at: lib/StaticAnalyzer/Checkers/RecursionChecker.cpp:29 +// this patch. +REGISTER_

[PATCH] D28297: [StaticAnalyzer] Fix crash in CastToStructChecker

2017-03-03 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Thanks. looks good. https://reviews.llvm.org/D28297 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D30406: [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output

2017-03-02 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > I’ve added the single file output option but I would like to keep the > multi-file option default This sounds good to me! I agree that this is a very useful addition. https://reviews.llvm.org/D30406 ___ cfe-commits m

[PATCH] D28348: [analyzer] Taught the analyzer about Glib API to check Memory-leak

2017-03-01 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. > I am not clear why need to calculate the precise allocated size? The information generated by this checker is used for array bounds checking. For example, see https://reviews.llvm.org/

[PATCH] D30157: [analyzer] Improve valist check

2017-03-01 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: test/Analysis/valist-uninitialized-no-undef.c:25 + va_list va; + vprintf(isstring ? "%s" : "%d", va); //expected-warning{{Function 'vprintf' is called with an uninitialized va_list argument}} expected-note{{Function 'vprintf' is ca

[PATCH] D30341: [analyzer] clarify error messages about uninitialized function arguments

2017-03-01 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp:211 // Generate a report for this bug. - StringRef Desc = - describeUninitializedArgumentInCall(Call, IsFirstArgument); + std::string Desc = + des

[PATCH] D30489: [analyzer] catch out of bounds for VLA

2017-03-01 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Gábor's suggestion sounds good to me. I think ArrayBoundCheckerV2 checker has a higher chance to be productized / moved out of alpha in the future. Should we just remove ArrayBoundChecker.cpp or is there a value in keeping it around? Repository: rL LLVM https://r

[PATCH] D30406: [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output

2017-03-01 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. No multi-file support is a long outstanding limitation of scan-build html output. Great to see the patch!! Thank you for working on it! > It's not as immediately clear this is a multi-file output. In addition to Artem's suggestions, you might want to insert multiple

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

2017-02-25 Thread Anna Zaks via cfe-commits
> Hans: this is a simple fix for a null-dereference in the static analyzer. > > Does it make sense to cherrypick? > > > > On Sat, Feb 18, 2017 at 2:46 AM, Anna Zaks via Phabricator > > > wrote: > >> > >> zaks.anna added a comment. > >>

[PATCH] D28278: [StaticAnalyzer] dont show wrong 'garbage value' warning when there is array index out of bounds

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

[PATCH] D28348: [analyzer] Taught the analyzer about Glib API to check Memory-leak

2017-02-24 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > Firstly I uploaded Glib-MallocChecker-single-size-value.patch for code > review, if submitted to UPSTREAM, then upload another one, correct? Yes. By the way, you can model XXX_n variants similarly to how calloc is modeled (see CallocMem). Comment

[PATCH] D29419: [Analyzer] Checker for mismatched iterators

2017-02-24 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > So it would be a wast of resources to duplicate these data. So now I am > also working on the merged version. Would it make sense to just resume the review on the merged patch? https://reviews.llvm.org/D29419 ___ cfe

[PATCH] D30289: [Analyzer] Add bug visitor for taint checker

2017-02-24 Thread Anna Zaks via Phabricator 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/D30289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[PATCH] D30341: [analyzer] clarify error messages about uninitialized function arguments

2017-02-24 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. I agree this can clarify the error message quite a bit! Comment at: lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp:160 if (ParamDecl->getType()->isPointerType()) { -Message = "Function call argument is a pointer to uninitialized value";

  1   2   3   4   5   6   >