[PATCH] D46007: [analyzer] Add `TaintBugVisitor` to the ArrayBoundV2, DivideZero and VLASize.
Henry Wong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 25 05:25:47 PDT 2018
MTC marked an inline comment as done.
MTC added inline comments.
================
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());
----------------
a.sidorin wrote:
> 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.
Thanks for your reminder, a.sidorin!
My mistakes led to some checkers doing the check and some did not check! But as you said, there is no need to check the nullptr.
I will update the patch.
Repository:
rC Clang
https://reviews.llvm.org/D46007
More information about the cfe-commits
mailing list