#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "clang/StaticAnalyzer/Core/CheckerManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/DynamicExtent.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/raw_ostream.h"
usingnamespaceclang;
usingnamespaceento;
namespace {
class UndefResultChecker
: public Checker< check::PostStmt<BinaryOperator> > { … };
}
static bool isArrayIndexOutOfBounds(CheckerContext &C, const Expr *Ex) { … }
void UndefResultChecker::checkPostStmt(const BinaryOperator *B,
CheckerContext &C) const { … }
void ento::registerUndefResultChecker(CheckerManager &mgr) { … }
bool ento::shouldRegisterUndefResultChecker(const CheckerManager &mgr) { … }