llvm/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp

//==- ObjCUnusedIVarsChecker.cpp - Check for unused ivars --------*- C++ -*-==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
//  This file defines a CheckObjCUnusedIvars, a checker that
//  analyzes an Objective-C class's interface/implementation to determine if it
//  has any ivars that are never accessed.
//
//===----------------------------------------------------------------------===//

#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) {}

//===----------------------------------------------------------------------===//
// ObjCUnusedIvarsChecker
//===----------------------------------------------------------------------===//

namespace {
class ObjCUnusedIvarsChecker : public Checker<
                                      check::ASTDecl<ObjCImplementationDecl> > {};
}

void ento::registerObjCUnusedIvarsChecker(CheckerManager &mgr) {}

bool ento::shouldRegisterObjCUnusedIvarsChecker(const CheckerManager &mgr) {}