13#ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_TAINT_H
14#define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_TAINT_H
83 const char *sep =
"");
95 void Profile(llvm::FoldingSetNodeID &ID)
const override { ID.Add(
V); }
It wraps the AnalysisDeclContext to represent both the call stack with the help of StackFrameContext ...
Stmt - This represents one statement.
BugReporterVisitors are used to add custom diagnostics along a path.
MemRegion - The root abstract class for all memory regions.
SVal - This represents a symbolic expression, which can be either an L-value or an R-value.
SubRegion - A region that subsets another larger region.
The bug visitor prints a diagnostic message at the location where a given variable was tainted.
PathDiagnosticPieceRef VisitNode(const ExplodedNode *N, BugReporterContext &BRC, PathSensitiveBugReport &BR) override
Return a diagnostic piece which should be associated with the given node.
TaintBugVisitor(const SVal V)
void Profile(llvm::FoldingSetNodeID &ID) const override
ProgramStateRef addTaint(ProgramStateRef State, const Stmt *S, const LocationContext *LCtx, TaintTagType Kind=TaintTagGeneric)
Create a new state in which the value of the statement is marked as tainted.
bool isTainted(ProgramStateRef State, const Stmt *S, const LocationContext *LCtx, TaintTagType Kind=TaintTagGeneric)
Check if the statement has a tainted value in the given state.
ProgramStateRef removeTaint(ProgramStateRef State, SVal V)
void printTaint(ProgramStateRef State, raw_ostream &Out, const char *nl="\n", const char *sep="")
ProgramStateRef addPartialTaint(ProgramStateRef State, SymbolRef ParentSym, const SubRegion *SubRegion, TaintTagType Kind=TaintTagGeneric)
Create a new state in a which a sub-region of a given symbol is tainted.
LLVM_DUMP_METHOD void dumpTaint(ProgramStateRef State)
static constexpr TaintTagType TaintTagGeneric
std::shared_ptr< PathDiagnosticPiece > PathDiagnosticPieceRef