[PATCH] D46007: [analyzer] Add `TaintBugVisitor` to the ArrayBoundV2, DivideZero and VLASize.

Aleksei Sidorin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 24 10:23:25 PDT 2018


a.sidorin added a comment.

Mostly LG.



================
Comment at: lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp:75
   auto report = llvm::make_unique<BugReport>(*BT, os.str(), N);
+  report->addVisitor(std::move(Visitor));
   report->addRange(SizeE->getSourceRange());
----------------
In this patch, sometimes we check the visitor to be non-null, sometimes not.  As I can see, `BugReport::addVisitor()` works well with `nullptr` arguments (it checks arguments) so I think we can omit the checks.


Repository:
  rC Clang

https://reviews.llvm.org/D46007





More information about the cfe-commits mailing list