#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/DynamicType.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h"
usingnamespaceclang;
usingnamespaceento;
namespace {
class DynamicTypeChecker : public Checker<check::PostStmt<ImplicitCastExpr>> { … };
}
void DynamicTypeChecker::reportTypeError(QualType DynamicType,
QualType StaticType,
const MemRegion *Reg,
const Stmt *ReportedNode,
CheckerContext &C) const { … }
PathDiagnosticPieceRef DynamicTypeChecker::DynamicTypeBugVisitor::VisitNode(
const ExplodedNode *N, BugReporterContext &BRC, PathSensitiveBugReport &) { … }
static bool hasDefinition(const ObjCObjectPointerType *ObjPtr) { … }
void DynamicTypeChecker::checkPostStmt(const ImplicitCastExpr *CE,
CheckerContext &C) const { … }
void ento::registerDynamicTypeChecker(CheckerManager &mgr) { … }
bool ento::shouldRegisterDynamicTypeChecker(const CheckerManager &mgr) { … }