clang API Documentation
00001 //== Checker.cpp - Registration mechanism for checkers -----------*- C++ -*--=// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file defines Checker, used to create and register checkers. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h" 00015 #include "clang/StaticAnalyzer/Core/Checker.h" 00016 00017 using namespace clang; 00018 using namespace ento; 00019 00020 StringRef CheckerBase::getTagDescription() const { 00021 return getCheckName().getName(); 00022 } 00023 00024 CheckName CheckerBase::getCheckName() const { return Name; } 00025 00026 CheckerProgramPointTag::CheckerProgramPointTag(StringRef CheckerName, 00027 StringRef Msg) 00028 : SimpleProgramPointTag(CheckerName, Msg) {} 00029 00030 CheckerProgramPointTag::CheckerProgramPointTag(const CheckerBase *Checker, 00031 StringRef Msg) 00032 : SimpleProgramPointTag(Checker->getCheckName().getName(), Msg) {} 00033 00034 raw_ostream& clang::ento::operator<<(raw_ostream &Out, 00035 const CheckerBase &Checker) { 00036 Out << Checker.getCheckName().getName(); 00037 return Out; 00038 } 00039 00040 void Checker<check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, 00041 check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, 00042 check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, 00043 check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, 00044 check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, 00045 check::_VoidCheck, check::_VoidCheck, check::_VoidCheck 00046 >::anchor() { }