clang
19.0.0git
|
Typedefs | |
using | TaintTagType = unsigned |
The type of taint, which helps to differentiate between different types of taint. More... | |
Variables | |
static constexpr TaintTagType | TaintTagGeneric = 0 |
using clang::ento::taint::TaintTagType = typedef unsigned |
ProgramStateRef clang::ento::taint::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.
This might be necessary when referring to regions that can not have an individual symbol, e.g. if they are represented by the default binding of a LazyCompoundVal.
Definition at line 124 of file Taint.cpp.
References addTaint(), clang::ento::MemRegion::getBaseRegion(), State, and clang::T.
Referenced by addTaint().
ProgramStateRef clang::ento::taint::addTaint | ( | ProgramStateRef | State, |
const MemRegion * | R, | ||
TaintTagType | Kind = TaintTagGeneric |
||
) |
Create a new state in which the pointer represented by the region is marked as tainted.
Definition at line 79 of file Taint.cpp.
References addTaint(), and State.
ProgramStateRef clang::ento::taint::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.
Definition at line 45 of file Taint.cpp.
Referenced by addPartialTaint(), and addTaint().
ProgramStateRef clang::ento::taint::addTaint | ( | ProgramStateRef | State, |
SVal | V, | ||
TaintTagType | Kind = TaintTagGeneric |
||
) |
Create a new state in which the value is marked as tainted.
Definition at line 51 of file Taint.cpp.
References addPartialTaint(), addTaint(), State, and V.
ProgramStateRef clang::ento::taint::addTaint | ( | ProgramStateRef | State, |
SymbolRef | Sym, | ||
TaintTagType | Kind = TaintTagGeneric |
||
) |
void clang::ento::taint::dumpTaint | ( | ProgramStateRef | State | ) |
Definition at line 41 of file Taint.cpp.
References printTaint(), and State.
std::vector< SymbolRef > clang::ento::taint::getTaintedSymbols | ( | ProgramStateRef | State, |
const MemRegion * | Reg, | ||
TaintTagType | Kind = TaintTagGeneric |
||
) |
Returns the tainted (index, super/sub region, symbolic region) symbols for a given memory region.
Definition at line 187 of file Taint.cpp.
References getTaintedSymbolsImpl(), and State.
std::vector< SymbolRef > clang::ento::taint::getTaintedSymbols | ( | ProgramStateRef | State, |
const Stmt * | S, | ||
const LocationContext * | LCtx, | ||
TaintTagType | Kind = TaintTagGeneric |
||
) |
std::vector< SymbolRef > clang::ento::taint::getTaintedSymbols | ( | ProgramStateRef | State, |
SVal | V, | ||
TaintTagType | Kind = TaintTagGeneric |
||
) |
std::vector< SymbolRef > clang::ento::taint::getTaintedSymbols | ( | ProgramStateRef | State, |
SymbolRef | Sym, | ||
TaintTagType | Kind = TaintTagGeneric |
||
) |
Returns the tainted Symbols for a SymbolRef and state.
Definition at line 181 of file Taint.cpp.
References getTaintedSymbolsImpl(), and State.
std::vector< SymbolRef > clang::ento::taint::getTaintedSymbolsImpl | ( | ProgramStateRef | State, |
const MemRegion * | Reg, | ||
TaintTagType | Kind, | ||
bool | returnFirstOnly | ||
) |
Definition at line 212 of file Taint.cpp.
References getTaintedSymbolsImpl(), and State.
std::vector< SymbolRef > clang::ento::taint::getTaintedSymbolsImpl | ( | ProgramStateRef | State, |
const Stmt * | S, | ||
const LocationContext * | LCtx, | ||
TaintTagType | Kind, | ||
bool | returnFirstOnly | ||
) |
Definition at line 193 of file Taint.cpp.
Referenced by getTaintedSymbols(), getTaintedSymbolsImpl(), and isTainted().
std::vector< SymbolRef > clang::ento::taint::getTaintedSymbolsImpl | ( | ProgramStateRef | State, |
SVal | V, | ||
TaintTagType | Kind, | ||
bool | returnFirstOnly | ||
) |
Definition at line 202 of file Taint.cpp.
References getTaintedSymbolsImpl(), State, and V.
std::vector< SymbolRef > clang::ento::taint::getTaintedSymbolsImpl | ( | ProgramStateRef | State, |
SymbolRef | Sym, | ||
TaintTagType | Kind, | ||
bool | returnFirstOnly | ||
) |
Definition at line 251 of file Taint.cpp.
References getTaintedSymbolsImpl(), clang::ento::SubRegion::isSubRegionOf(), State, and clang::ento::SymExpr::symbols().
bool clang::ento::taint::isTainted | ( | ProgramStateRef | State, |
const MemRegion * | Reg, | ||
TaintTagType | Kind = TaintTagGeneric |
||
) |
Check if the pointer represented by the region is tainted in the given state.
Definition at line 158 of file Taint.cpp.
References getTaintedSymbolsImpl(), and State.
bool clang::ento::taint::isTainted | ( | ProgramStateRef | State, |
const Stmt * | S, | ||
const LocationContext * | LCtx, | ||
TaintTagType | Kind = TaintTagGeneric |
||
) |
bool clang::ento::taint::isTainted | ( | ProgramStateRef | State, |
SVal | V, | ||
TaintTagType | Kind = TaintTagGeneric |
||
) |
Check if the value is tainted in the given state.
Definition at line 153 of file Taint.cpp.
References getTaintedSymbolsImpl(), State, and V.
bool clang::ento::taint::isTainted | ( | ProgramStateRef | State, |
SymbolRef | Sym, | ||
TaintTagType | Kind = TaintTagGeneric |
||
) |
Check if the symbol is tainted in the given state.
Definition at line 164 of file Taint.cpp.
References getTaintedSymbolsImpl(), and State.
void clang::ento::taint::printTaint | ( | ProgramStateRef | State, |
raw_ostream & | Out, | ||
const char * | nl = "\n" , |
||
const char * | sep = "" |
||
) |
Referenced by dumpTaint().
ProgramStateRef clang::ento::taint::removeTaint | ( | ProgramStateRef | State, |
const MemRegion * | R | ||
) |
Definition at line 107 of file Taint.cpp.
References removeTaint(), and State.
ProgramStateRef clang::ento::taint::removeTaint | ( | ProgramStateRef | State, |
SVal | V | ||
) |
ProgramStateRef clang::ento::taint::removeTaint | ( | ProgramStateRef | State, |
SymbolRef | Sym | ||
) |
|
staticconstexpr |