1//===--- CheckerOptInfo.h - Specifies which checkers to use -----*- 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#ifndef LLVM_CLANG_STATICANALYZER_CORE_CHECKEROPTINFO_H 11#define LLVM_CLANG_STATICANALYZER_CORE_CHECKEROPTINFO_H 12 13#include "clang/Basic/LLVM.h" 14 15namespace clang { 16namespace ento { 17 18/// Represents a request to include or exclude a checker or package from a 19/// specific analysis run. 20/// 21/// \sa CheckerRegistry::initializeManager 22class CheckerOptInfo { 23 StringRef Name; 24 bool Enable; 25 bool Claimed; 26 27public: 28 CheckerOptInfo(StringRef name, bool enable) 29 : Name(name), Enable(enable), Claimed(false) { } 30 31 StringRef getName() const { return Name; } 32 bool isEnabled() const { return Enable; } 33 bool isDisabled() const { return !isEnabled(); } 34 35 bool isClaimed() const { return Claimed; } 36 bool isUnclaimed() const { return !isClaimed(); } 37 void claim() { Claimed = true; } 38}; 39 40} // end namespace ento 41} // end namespace clang 42 43#endif 44