ClangCheckers.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. //===--- ClangCheckers.h - Provides builtin 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. #include "clang/StaticAnalyzer/Checkers/ClangCheckers.h"
  10. #include "clang/StaticAnalyzer/Core/CheckerRegistry.h"
  11. // FIXME: This is only necessary as long as there are checker registration
  12. // functions that do additional work besides mgr.registerChecker<CLASS>().
  13. // The only checkers that currently do this are:
  14. // - NSAutoreleasePoolChecker
  15. // - NSErrorChecker
  16. // - ObjCAtSyncChecker
  17. // It's probably worth including this information in Checkers.td to minimize
  18. // boilerplate code.
  19. #include "ClangSACheckers.h"
  20. using namespace clang;
  21. using namespace ento;
  22. void ento::registerBuiltinCheckers(CheckerRegistry &registry) {
  23. #define GET_CHECKERS
  24. #define CHECKER(FULLNAME,CLASS,DESCFILE,HELPTEXT,GROUPINDEX,HIDDEN) \
  25. registry.addChecker(register##CLASS, FULLNAME, HELPTEXT);
  26. #include "Checkers.inc"
  27. #undef GET_CHECKERS
  28. }