[PATCH] D45682: [analyzer] Move `TaintBugVisitor` from `GenericTaintChecker.cpp` to `BugReporterVisitors.h`.
Henry Wong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 22 06:55:03 PDT 2018
MTC added a comment.
In https://reviews.llvm.org/D45682#1074407, @george.karpenkov wrote:
> I'm new to the taint visitor, but I am quite confused by your change description.
>
> > and many checkers rely on it
>
> How can other checkers rely on it if it's private to the taint checker?
Thanks for your review, george! `TaintBugVisitor` is an utility to add extra information to illustrate where the taint information originated from. There are several checkers use taint information, e.g. `ArrayBoundCheckerV2.cpp`, in some cases it will report a warning, like `warning: Out of bound memory access (index is tainted)`. If `TaintBugVisitor` moves to `BugReporterVisitors.h`, `ArrayBoundCheckerV2` can add extra notes like `Taint originated here` to the report by adding `TaintBugVisitor`.
> Also, it's probably to explicitly include BugReporterVisitors.h in the checker file then.
If these checkers want to add `Taint originated here` using `TaintBugVisitor`, it is necessary to explicitly include `BugReporterVisitors.h` in following patch.
Repository:
rC Clang
https://reviews.llvm.org/D45682
More information about the cfe-commits
mailing list