25class FixedAddressChecker
26 :
public Checker< check::PreStmt<BinaryOperator> > {
27 const BugType BT{
this,
"Use fixed address"};
30 void checkPreStmt(
const BinaryOperator *B, CheckerContext &
C)
const;
52 SVal RV =
C.getSVal(B->
getRHS());
60 if (ExplodedNode *N =
C.generateNonFatalErrorNode()) {
62 constexpr llvm::StringLiteral Msg =
63 "Using a fixed address is not portable because that address will "
64 "probably not be valid in all environments or platforms.";
65 auto R = std::make_unique<PathSensitiveBugReport>(BT, Msg, N);
67 C.emitReport(std::move(R));
71void ento::registerFixedAddressChecker(CheckerManager &mgr) {
75bool ento::shouldRegisterFixedAddressChecker(
const CheckerManager &mgr) {
A builtin binary operation expression such as "x + y" or "x <= y".
Expr * IgnoreParenCasts() LLVM_READONLY
Skip past any parentheses and casts which might surround this expression until reaching a fixed point...
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
SourceLocation getBeginLoc() const LLVM_READONLY
bool isPointerType() const
CHECKER * registerChecker(AT &&...Args)
Register a single-part checker (derived from Checker): construct its singleton instance,...
Simple checker classes that implement one frontend (i.e.
bool isZeroConstant() const
The JSON file list parser is used to communicate input to InstallAPI.
const FunctionProtoType * T