llvm/clang/include/clang/StaticAnalyzer/Core/Checker.h

//== Checker.h - Registration mechanism for checkers -------------*- 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 Checker, used to create and register checkers.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_STATICANALYZER_CORE_CHECKER_H
#define LLVM_CLANG_STATICANALYZER_CORE_CHECKER_H

#include "clang/Analysis/ProgramPoint.h"
#include "clang/Basic/LangOptions.h"
#include "clang/StaticAnalyzer/Core/CheckerManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
#include "llvm/Support/Casting.h"

namespace clang {
namespace ento {
  class BugReporter;

namespace check {

template <typename DECL>
class ASTDecl {};

class ASTCodeBody {};

class EndOfTranslationUnit {};

template <typename STMT>
class PreStmt {};

template <typename STMT>
class PostStmt {};

class PreObjCMessage {};

class ObjCMessageNil {};

class PostObjCMessage {};

class PreCall {};

class PostCall {};

class Location {};

class Bind {};

class EndAnalysis {};

class BeginFunction {};

class EndFunction {};

class BranchCondition {};

class NewAllocator {};

class LiveSymbols {};

class DeadSymbols {};

class RegionChanges {};

class PointerEscape {};

class ConstPointerEscape {};


template <typename EVENT>
class Event {};

} // end check namespace

namespace eval {

class Assume {};

class Call {};

} // end eval namespace

class CheckerBase : public ProgramPointTag {};

/// Dump checker name to stream.
raw_ostream& operator<<(raw_ostream &Out, const CheckerBase &Checker);

/// Tag that can use a checker name as a message provider
/// (see SimpleProgramPointTag).
class CheckerProgramPointTag : public SimpleProgramPointTag {};

template <typename CHECK1, typename... CHECKs>
class Checker : public CHECK1, public CHECKs..., public CheckerBase {};

Checker<CHECK1>;

template <typename EVENT>
class EventDispatcher {};

/// We dereferenced a location that may be null.
struct ImplicitNullDerefEvent {};

} // end ento namespace

} // end clang namespace

#endif