#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/CallEvent.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
usingnamespaceclang;
usingnamespaceento;
namespace {
class UndefinedNewArraySizeChecker : public Checker<check::PreCall> { … };
}
void UndefinedNewArraySizeChecker::checkPreCall(const CallEvent &Call,
CheckerContext &C) const { … }
void UndefinedNewArraySizeChecker::HandleUndefinedArrayElementCount(
CheckerContext &C, SVal ArgVal, const Expr *Init, SourceRange Range) const { … }
void ento::registerUndefinedNewArraySizeChecker(CheckerManager &mgr) { … }
bool ento::shouldRegisterUndefinedNewArraySizeChecker(
const CheckerManager &mgr) { … }