25class UndefinedArraySubscriptChecker
26 :
public Checker< check::PreStmt<ArraySubscriptExpr> > {
27 mutable std::unique_ptr<BugType> BT;
38 if (!
C.getSVal(Index).isUndef())
43 const Decl *D =
C.getLocationContext()->getDecl();
45 if (Ctor->isDefaulted())
52 BT.reset(
new BugType(
this,
"Array subscript is undefined"));
55 auto R = std::make_unique<PathSensitiveBugReport>(*BT, BT->getDescription(), N);
58 C.emitReport(std::move(R));
61void ento::registerUndefinedArraySubscriptChecker(
CheckerManager &mgr) {
65bool ento::shouldRegisterUndefinedArraySubscriptChecker(
const CheckerManager &mgr) {
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
Represents a C++ constructor within a class.
Decl - This represents one declaration (or definition), e.g.
This represents one expression.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
CHECKER * registerChecker(AT &&... Args)
Used to register checkers.
bool trackExpressionValue(const ExplodedNode *N, const Expr *E, PathSensitiveBugReport &R, TrackingOptions Opts={})
Attempts to add visitors to track expression value back to its point of origin.