#include "clang/AST/Attr.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprObjC.h"
#include "clang/Analysis/PathDiagnostic.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceManager.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "llvm/ADT/STLExtras.h"
usingnamespaceclang;
usingnamespaceento;
enum IVarState { … };
IvarUsageMap;
static void Scan(IvarUsageMap& M, const Stmt *S) { … }
static void Scan(IvarUsageMap& M, const ObjCPropertyImplDecl *D) { … }
static void Scan(IvarUsageMap& M, const ObjCContainerDecl *D) { … }
static void Scan(IvarUsageMap &M, const DeclContext *C, const FileID FID,
const SourceManager &SM) { … }
static void checkObjCUnusedIvar(const ObjCImplementationDecl *D,
BugReporter &BR,
const CheckerBase *Checker) { … }
namespace {
class ObjCUnusedIvarsChecker : public Checker<
check::ASTDecl<ObjCImplementationDecl> > { … };
}
void ento::registerObjCUnusedIvarsChecker(CheckerManager &mgr) { … }
bool ento::shouldRegisterObjCUnusedIvarsChecker(const CheckerManager &mgr) { … }