clang API Documentation

Namespaces | Classes | Typedefs | Functions | Variables
clang::ento Namespace Reference

Namespaces

namespace  bugreporter
namespace  categories
namespace  check
namespace  clang
namespace  cocoa
namespace  coreFoundation
namespace  eval
namespace  loc
namespace  nonloc
namespace  summMgr

Classes

class  BugReport
class  BugReportEquivClass
class  BugReporterData
class  BugReporter
class  GRBugReporter
class  BugReporterContext
class  BugReporterVisitor
 BugReporterVisitors are used to add custom diagnostics along a path. More...
class  BugReporterVisitorImpl
class  FindLastStoreBRVisitor
class  TrackConstraintBRVisitor
class  NilReceiverBRVisitor
class  ConditionBRVisitor
 Visitor that tries to report interesting diagnostics from conditions. More...
class  BugType
class  BuiltinBug
class  PathDiagnosticConsumer
class  PathDiagnosticRange
class  PathDiagnosticLocation
class  PathDiagnosticLocationPair
class  PathDiagnosticPiece
class  PathPieces
class  PathDiagnosticSpotPiece
class  StackHintGenerator
 Interface for classes constructing Stack hints. More...
class  StackHintGeneratorForSymbol
 Constructs a Stack hint for the given symbol. More...
class  PathDiagnosticEventPiece
class  PathDiagnosticCallPiece
class  PathDiagnosticControlFlowPiece
class  PathDiagnosticMacroPiece
class  PathDiagnostic
class  CheckerBase
class  Checker< check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, check::_VoidCheck, check::_VoidCheck >
class  Checker
class  EventDispatcher
struct  ImplicitNullDerefEvent
 We dereferenced a location that may be null. More...
class  GraphExpander
class  CheckerFn< RET(P1, P2, P3, P4, P5)>
class  CheckerFn< RET(P1, P2, P3, P4)>
class  CheckerFn< RET(P1, P2, P3)>
class  CheckerFn< RET(P1, P2)>
class  CheckerFn< RET(P1)>
class  CheckerFn< RET()>
class  CheckerManager
class  CheckerOptInfo
class  CheckerRegistry
class  AnalysisManager
class  APSIntType
 A record of the "type" of an APSInt, used for conversions. More...
class  CompoundValData
class  LazyCompoundValData
class  BasicValueFactory
class  BlockCounter
 An abstract data type used to count the number of times a given block has been visited along a path analyzed by CoreEngine. More...
class  CheckerContext
struct  DefaultBool
 A helper class which wraps a boolean value set to false by default. More...
class  ConstraintManager
class  CoreEngine
struct  NodeBuilderContext
class  NodeBuilder
 This is the simplest builder which generates nodes in the ExplodedGraph. More...
class  NodeBuilderWithSinks
 This node builder keeps track of the generated sink nodes. More...
class  StmtNodeBuilder
 This builder class is useful for generating nodes that resulted from visiting a statement. The main difference from it's parent NodeBuilder is that it creates a statement specific ProgramPoint. More...
class  BranchNodeBuilder
 BranchNodeBuilder is responsible for constructing the nodes corresponding to the two branches of the if statement - true and false. More...
class  IndirectGotoNodeBuilder
class  SwitchNodeBuilder
class  EnvironmentEntry
class  Environment
 An immutable map from EnvironemntEntries to SVals. More...
class  EnvironmentManager
class  ExplodedNode
class  InterExplodedGraphMap
class  ExplodedGraph
class  ExplodedNodeSet
class  ExprEngine
struct  ReplayWithoutInlining
struct  ProgramStateTrait< ReplayWithoutInlining >
class  FunctionSummariesTy
class  RegionOffset
 Represent a region's offset within the top level base region. More...
class  MemRegion
 MemRegion - The root abstract class for all memory regions. More...
class  MemSpaceRegion
class  GlobalsSpaceRegion
class  StaticGlobalSpaceRegion
 The region of the static variables within the current CodeTextRegion scope. More...
class  NonStaticGlobalSpaceRegion
 The region for all the non-static global variables. More...
class  GlobalSystemSpaceRegion
 The region containing globals which are defined in system/external headers and are considered modifiable by system calls (ex: errno). More...
class  GlobalImmutableSpaceRegion
 The region containing globals which are considered not to be modified or point to data which could be modified as a result of a function call (system or internal). Ex: Const global scalars would be modeled as part of this region. This region also includes most system globals since they have low chance of being modified. More...
class  GlobalInternalSpaceRegion
 The region containing globals which can be modified by calls to "internally" defined functions - (for now just) functions other then system calls. More...
class  HeapSpaceRegion
class  UnknownSpaceRegion
class  StackSpaceRegion
class  StackLocalsSpaceRegion
class  StackArgumentsSpaceRegion
class  SubRegion
class  AllocaRegion
class  TypedRegion
 TypedRegion - An abstract class representing regions that are typed. More...
class  TypedValueRegion
 TypedValueRegion - An abstract class representing regions having a typed value. More...
class  CodeTextRegion
class  FunctionTextRegion
 FunctionTextRegion - A region that represents code texts of function. More...
class  BlockTextRegion
class  BlockDataRegion
class  SymbolicRegion
class  StringRegion
 StringRegion - Region associated with a StringLiteral. More...
class  ObjCStringRegion
 The region associated with an ObjCStringLiteral. More...
class  CompoundLiteralRegion
class  DeclRegion
class  VarRegion
class  CXXThisRegion
class  FieldRegion
class  ObjCIvarRegion
class  RegionRawOffset
class  ElementRegion
 ElementRegin is used to represent both array elements and casts. More...
class  CXXTempObjectRegion
class  CXXBaseObjectRegion
class  MemRegionManager
class  ObjCMessage
 Represents both explicit ObjC message expressions and implicit messages that are sent for handling properties in dot syntax. More...
class  CallOrObjCMessage
 Common wrapper for a call expression, ObjC message, or C++ constructor, mainly to provide a common interface for their arguments. More...
struct  ProgramStateTrait
class  ProgramState
class  ProgramStateManager
class  ScanReachableSymbols
struct  ProgramStatePartialTrait< llvm::ImmutableMap< Key, Data, Info > >
struct  ProgramStatePartialTrait< llvm::ImmutableSet< Key, Info > >
struct  ProgramStatePartialTrait< llvm::ImmutableList< T > >
struct  ProgramStatePartialTrait< bool >
struct  ProgramStatePartialTrait< unsigned >
struct  ProgramStatePartialTrait< void * >
class  StoreManager
class  SubRegionMap
class  StoreRef
class  SubEngine
class  SummaryManagerImpl
class  SummaryManager
class  SValBuilder
class  SVal
class  UndefinedVal
class  DefinedOrUnknownSVal
class  UnknownVal
class  DefinedSVal
class  NonLoc
class  Loc
class  SymExpr
 Symbolic value. These values used to capture symbolic execution of the program. More...
class  SymbolData
 A symbol representing data which can be stored in a memory location (region). More...
class  SymbolRegionValue
 A symbol representing the value stored at a MemRegion. More...
class  SymbolConjured
class  SymbolDerived
class  SymbolExtent
class  SymbolMetadata
class  SymbolCast
 Represents a cast expression. More...
class  SymIntExpr
 SymIntExpr - Represents symbolic expression like 'x' + 3. More...
class  IntSymExpr
 IntSymExpr - Represents symbolic expression like 3 - 'x'. More...
class  SymSymExpr
 SymSymExpr - Represents symbolic expression like 'x' + 'y'. More...
class  SymbolManager
class  SymbolReaper
 A class responsible for cleaning up unused symbols. More...
class  SymbolVisitor
struct  TaintMap
struct  ProgramStateTrait< TaintMap >
class  TaintManager
class  WorkListUnit
class  WorkList
class  AnalysisAction
struct  ProgramStateTrait< CStringLength >
struct  ProgramStateTrait< TaintArgsOnPostVisit >
struct  ProgramStateTrait< IteratorState >
struct  ProgramStateTrait< CalledReserved >
struct  ProgramStateTrait< AllocatedData >
struct  ProgramStateTrait< RegionState >
struct  ProgramStateTrait< ReallocPairs >
struct  ProgramStateTrait< NSErrorOut >
struct  ProgramStateTrait< CFErrorOut >
struct  ProgramStateTrait< ArraySizeMap >
struct  ProgramStateTrait< SelfFlag >
struct  ProgramStateTrait< CalledInit >
struct  ProgramStateTrait< PreCallSelfFlags >
 A call receiving a reference to 'self' invalidates the object that 'self' contains. This keeps the "self flags" assigned to the 'self' object before the call so we can assign them to the new object that 'self' points to after the call. More...
struct  ProgramStateTrait< LockSet >
struct  ProgramStateTrait< RefBindings >
struct  ProgramStateTrait< AutoreleaseStack >
struct  ProgramStateTrait< AutoreleasePoolContents >
struct  ProgramStateTrait< StreamState >
struct  ProgramStateTrait< ConstNotEq >
struct  ProgramStateTrait< ConstEq >
struct  ProgramStateTrait< ConstraintRange >
class  SimpleConstraintManager

Typedefs

typedef const SymExprSymbolRef
typedef llvm::PointerUnion
< const LocationContext
*, AnalysisDeclContext * > 
LocationOrAnalysisDeclContext
typedef std::deque< Decl * > SetOfDecls
typedef llvm::DenseSet< const
Decl * > 
SetOfConstDecls
typedef ConstraintManager *(* ConstraintManagerCreator )(ProgramStateManager &, SubEngine &)
typedef StoreManager *(* StoreManagerCreator )(ProgramStateManager &)
typedef IntrusiveRefCntPtr
< const ProgramState
ProgramStateRef
typedef const void * Store
typedef llvm::SmallVector
< SymbolRef, 2 > 
SymbolRefSmallVectorTy
typedef unsigned SymbolID
typedef llvm::ImmutableMap
< SymbolRef, TaintTagType
TaintMapImpl
typedef unsigned TaintTagType

Functions

void registerBuiltinCheckers (CheckerRegistry &registry)
std::pair< ExplodedNode *const
*, ExplodedNode *const * > 
GetImplicitNullDereferences (ExprEngine &Eng)
void RegisterCallInliner (ExprEngine &Eng)
PathDiagnosticConsumercreateHTMLDiagnosticConsumer (const std::string &prefix, const Preprocessor &PP)
PathDiagnosticConsumercreatePlistDiagnosticConsumer (const std::string &prefix, const Preprocessor &PP, PathDiagnosticConsumer *SubPD=0)
PathDiagnosticConsumercreatePlistMultiFileDiagnosticConsumer (const std::string &prefix, const Preprocessor &PP)
PathDiagnosticConsumercreateTextPathDiagnosticConsumer (const std::string &prefix, const Preprocessor &PP)
bool containsMacro (const Stmt *S)
bool containsEnum (const Stmt *S)
bool containsStaticLocal (const Stmt *S)
bool containsBuiltinOffsetOf (const Stmt *S)
template<class T >
bool containsStmt (const Stmt *S)
ConstraintManagerCreateBasicConstraintManager (ProgramStateManager &statemgr, SubEngine &subengine)
ConstraintManagerCreateRangeConstraintManager (ProgramStateManager &statemgr, SubEngine &subengine)
void ProgramStateRetain (const ProgramState *state)
 Increments the number of times this state is referenced.
void ProgramStateRelease (const ProgramState *state)
 Decrement the number of times this state is referenced.
StoreManagerCreateRegionStoreManager (ProgramStateManager &StMgr)
StoreManagerCreateFieldsOnlyRegionStoreManager (ProgramStateManager &StMgr)
SValBuildercreateSimpleSValBuilder (llvm::BumpPtrAllocator &alloc, ASTContext &context, ProgramStateManager &stateMgr)
CheckerManagercreateCheckerManager (const AnalyzerOptions &opts, const LangOptions &langOpts, ArrayRef< std::string > plugins, DiagnosticsEngine &diags)
void printCheckerHelp (raw_ostream &OS, ArrayRef< std::string > plugins)
void registerCStringCheckerBasic (CheckerManager &Mgr)
 Register the checker which evaluates CString API calls.
static BinaryOperator::Opcode NegateComparison (BinaryOperator::Opcode op)
static void computeAdjustment (SymbolRef &Sym, llvm::APSInt &Adjustment)
ASTConsumerCreateAnalysisConsumer (const Preprocessor &pp, const std::string &output, const AnalyzerOptions &opts, ArrayRef< std::string > plugins)

Variables

static const TaintTagType TaintTagGeneric = 0

Typedef Documentation

Definition at line 40 of file ProgramState.h.

Definition at line 99 of file PathDiagnostic.h.

typedef IntrusiveRefCntPtr<const ProgramState> clang::ento::ProgramStateRef

Definition at line 38 of file ProgramState_Fwd.h.

typedef llvm::DenseSet<const Decl*> clang::ento::SetOfConstDecls

Definition at line 26 of file FunctionSummary.h.

typedef std::deque<Decl*> clang::ento::SetOfDecls

Definition at line 25 of file FunctionSummary.h.

typedef const void* clang::ento::Store

Store - This opaque type encapsulates an immutable mapping from locations to values. At a high-level, it represents the symbolic memory model. Different subclasses of StoreManager may choose different types to represent the locations and values.

Definition at line 26 of file StoreRef.h.

Definition at line 42 of file ProgramState.h.

typedef unsigned clang::ento::SymbolID

Definition at line 104 of file SymbolManager.h.

Definition at line 44 of file PathDiagnostic.h.

typedef llvm::SmallVector<SymbolRef, 2> clang::ento::SymbolRefSmallVectorTy

Definition at line 102 of file SymbolManager.h.

typedef llvm::ImmutableMap<SymbolRef, TaintTagType> clang::ento::TaintMapImpl

Definition at line 26 of file TaintManager.h.

typedef unsigned clang::ento::TaintTagType

The type of taint, which helps to differentiate between different types of taint.

Definition at line 22 of file TaintTag.h.


Function Documentation

static void clang::ento::computeAdjustment ( SymbolRef &  Sym,
llvm::APSInt &  Adjustment 
) [static]
bool clang::ento::containsBuiltinOffsetOf ( const Stmt *  S)

Definition at line 69 of file CheckerHelpers.cpp.

References clang::Stmt::child_begin(), and clang::Stmt::child_end().

bool clang::ento::containsEnum ( const Stmt *  S)
bool clang::ento::containsMacro ( const Stmt *  S)
bool clang::ento::containsStaticLocal ( const Stmt *  S)
template<class T >
bool clang::ento::containsStmt ( const Stmt *  S)

Definition at line 27 of file CheckerHelpers.h.

References clang::Stmt::children().

ASTConsumer * clang::ento::CreateAnalysisConsumer ( const Preprocessor pp,
const std::string &  output,
const AnalyzerOptions opts,
ArrayRef< std::string >  plugins 
)

CreateAnalysisConsumer - Creates an ASTConsumer to run various code analysis passes. (The set of analyses run is controlled by command-line options.)

Definition at line 568 of file AnalysisConsumer.cpp.

References clang::Preprocessor::getDiagnostics(), and clang::DiagnosticsEngine::setWarningsAsErrors().

Referenced by clang::ento::AnalysisAction::CreateASTConsumer().

ConstraintManager * clang::ento::CreateBasicConstraintManager ( ProgramStateManager &  statemgr,
SubEngine &  subengine 
)

Definition at line 131 of file BasicConstraintManager.cpp.

CheckerManager * clang::ento::createCheckerManager ( const AnalyzerOptions opts,
const LangOptions langOpts,
ArrayRef< std::string >  plugins,
DiagnosticsEngine diags 
)
StoreManager * clang::ento::CreateFieldsOnlyRegionStoreManager ( ProgramStateManager &  StMgr)

Definition at line 443 of file RegionStore.cpp.

PathDiagnosticConsumer * clang::ento::createHTMLDiagnosticConsumer ( const std::string &  prefix,
const Preprocessor PP 
)

Definition at line 80 of file HTMLDiagnostics.cpp.

Referenced by createPlistHTMLDiagnosticConsumer().

PathDiagnosticConsumer * clang::ento::createPlistDiagnosticConsumer ( const std::string &  prefix,
const Preprocessor PP,
PathDiagnosticConsumer *  SubPD = 0 
)
PathDiagnosticConsumer * clang::ento::createPlistMultiFileDiagnosticConsumer ( const std::string &  prefix,
const Preprocessor PP 
)

Definition at line 74 of file PlistDiagnostics.cpp.

References clang::Preprocessor::getLangOpts().

ConstraintManager * clang::ento::CreateRangeConstraintManager ( ProgramStateManager &  statemgr,
SubEngine &  subengine 
)
StoreManager * clang::ento::CreateRegionStoreManager ( ProgramStateManager &  StMgr)

Definition at line 437 of file RegionStore.cpp.

SValBuilder * clang::ento::createSimpleSValBuilder ( llvm::BumpPtrAllocator &  alloc,
ASTContext context,
ProgramStateManager &  stateMgr 
)

Definition at line 52 of file SimpleSValBuilder.cpp.

PathDiagnosticConsumer * clang::ento::createTextPathDiagnosticConsumer ( const std::string &  prefix,
const Preprocessor PP 
)

Definition at line 50 of file TextPathDiagnostics.cpp.

References clang::Preprocessor::getDiagnostics().

std::pair<ExplodedNode * const *, ExplodedNode * const *> clang::ento::GetImplicitNullDereferences ( ExprEngine &  Eng)
static BinaryOperator::Opcode clang::ento::NegateComparison ( BinaryOperator::Opcode  op) [static]
void clang::ento::printCheckerHelp ( raw_ostream &  OS,
ArrayRef< std::string >  plugins 
)

Definition at line 128 of file CheckerRegistration.cpp.

Referenced by clang::ExecuteCompilerInvocation().

void clang::ento::ProgramStateRelease ( const ProgramState *  state)

Decrement the number of times this state is referenced.

Definition at line 36 of file ProgramState.cpp.

References clang::ento::ProgramState::getStateManager(), and clang::ento::ProgramState::~ProgramState().

Referenced by llvm::IntrusiveRefCntPtrInfo< const clang::ento::ProgramState >::release().

void clang::ento::ProgramStateRetain ( const ProgramState *  state)

Increments the number of times this state is referenced.

Definition at line 31 of file ProgramState.cpp.

Referenced by llvm::IntrusiveRefCntPtrInfo< const clang::ento::ProgramState >::retain().

void clang::ento::registerBuiltinCheckers ( CheckerRegistry &  registry)

Definition at line 26 of file ClangCheckers.cpp.

void clang::ento::RegisterCallInliner ( ExprEngine &  Eng)
void clang::ento::registerCStringCheckerBasic ( CheckerManager &  Mgr)

Register the checker which evaluates CString API calls.

Definition at line 1998 of file CStringChecker.cpp.


Variable Documentation

Definition at line 23 of file TaintTag.h.