Example #1
0
void ento::registerCastSizeChecker(CheckerManager &mgr) {
  // PR31226: C++ is more complicated than what this checker currently supports.
  // There are derived-to-base casts, there are different rules for 0-size
  // structures, no flexible arrays, etc.
  // FIXME: Disabled on C++ for now.
  if (!mgr.getLangOpts().CPlusPlus)
    mgr.registerChecker<CastSizeChecker>();
}
Example #2
0
void ento::registerObjCDeallocChecker(CheckerManager &Mgr) {
  const LangOptions &LangOpts = Mgr.getLangOpts();
  // These checker only makes sense under MRR.
  if (LangOpts.getGC() == LangOptions::GCOnly || LangOpts.ObjCAutoRefCount)
    return;

  Mgr.registerChecker<ObjCDeallocChecker>();
}
Example #3
0
void ento::registerGTestChecker(CheckerManager &Mgr) {
  const LangOptions &LangOpts = Mgr.getLangOpts();
  // gtest is a C++ API so there is no sense running the checker
  // if not compiling for C++.
  if (!LangOpts.CPlusPlus)
    return;

  Mgr.registerChecker<GTestChecker>();
}
void ento::registerNSAutoreleasePoolChecker(CheckerManager &mgr) {
  if (mgr.getLangOpts().getGC() != LangOptions::NonGC)
    mgr.registerChecker<NSAutoreleasePoolChecker>();
}
Example #5
0
void ento::registerObjCSuperDeallocChecker(CheckerManager &Mgr) {
  const LangOptions &LangOpts = Mgr.getLangOpts();
  if (LangOpts.getGC() == LangOptions::GCOnly || LangOpts.ObjCAutoRefCount)
    return;
  Mgr.registerChecker<ObjCSuperDeallocChecker>();
}
Example #6
0
void ento::registerObjCAtSyncChecker(CheckerManager &mgr) {
  if (mgr.getLangOpts().ObjC2)
    mgr.registerChecker<ObjCAtSyncChecker>();
}