clang API Documentation

ClangCheckers.cpp
Go to the documentation of this file.
00001 //===--- ClangCheckers.h - Provides builtin 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 #include "clang/StaticAnalyzer/Checkers/ClangCheckers.h"
00011 #include "clang/StaticAnalyzer/Core/CheckerRegistry.h"
00012 
00013 // FIXME: This is only necessary as long as there are checker registration
00014 // functions that do additional work besides mgr.registerChecker<CLASS>().
00015 // The only checkers that currently do this are:
00016 // - NSAutoreleasePoolChecker
00017 // - NSErrorChecker
00018 // - ObjCAtSyncChecker
00019 // It's probably worth including this information in Checkers.td to minimize
00020 // boilerplate code.
00021 #include "ClangSACheckers.h"
00022 
00023 using namespace clang;
00024 using namespace ento;
00025 
00026 void ento::registerBuiltinCheckers(CheckerRegistry &registry) {
00027 #define GET_CHECKERS
00028 #define CHECKER(FULLNAME,CLASS,DESCFILE,HELPTEXT,GROUPINDEX,HIDDEN)    \
00029   registry.addChecker(register##CLASS, FULLNAME, HELPTEXT);
00030 #include "Checkers.inc"
00031 #undef GET_CHECKERS
00032 }