clang 8.0.0

Checker.cpp
Go to the documentation of this file.
1 //== Checker.cpp - Registration mechanism for checkers -----------*- C++ -*--=//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines Checker, used to create and register checkers.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h"
15 #include "clang/StaticAnalyzer/Core/Checker.h"
16
17 using namespace clang;
18 using namespace ento;
19
20 int ImplicitNullDerefEvent::Tag;
21
22 StringRef CheckerBase::getTagDescription() const {
23 return getCheckName().getName();
24 }
25
26 CheckName CheckerBase::getCheckName() const { return Name; }
27
28 CheckerProgramPointTag::CheckerProgramPointTag(StringRef CheckerName,
29 StringRef Msg)
30 : SimpleProgramPointTag(CheckerName, Msg) {}
31
32 CheckerProgramPointTag::CheckerProgramPointTag(const CheckerBase *Checker,
33 StringRef Msg)
34 : SimpleProgramPointTag(Checker->getCheckName().getName(), Msg) {}
35
36 raw_ostream& clang::ento::operator<<(raw_ostream &Out,
37 const CheckerBase &Checker) {
38 Out << Checker.getCheckName().getName();
39 return Out;
40 }
ento
clang::ento::CheckerBase::getCheckName
CheckName getCheckName() const
Definition: Checker.cpp:26
clang::CodeGen::getName
std::string getName(ArrayRef< StringRef > Parts) const
Get the platform-specific name separator.
Checker.h
clang::ento::CheckerBase::getTagDescription
StringRef getTagDescription() const override
Definition: Checker.cpp:22
clang::ento::Checker
Definition: Checker.h:516
clang::ento::CheckName::getName
StringRef getName() const
Definition: CheckerManager.h:108
ProgramState.h
clang::ento::ImplicitNullDerefEvent::Tag
static int Tag
Definition: Checker.h:562
clang::ento::CheckerProgramPointTag::CheckerProgramPointTag
CheckerProgramPointTag(StringRef CheckerName, StringRef Msg)
Definition: Checker.cpp:28
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:22
clang::ento::operator<<
raw_ostream & operator<<(raw_ostream &Out, const CheckerBase &Checker)
Dump checker name to stream.
Definition: Checker.cpp:36
clang::ento::CheckerBase
Definition: Checker.h:491
clang::SimpleProgramPointTag
Definition: ProgramPoint.h:54
clang::ento::CheckName
Definition: CheckerManager.h:98