clang API Documentation

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

Namespaces

namespace  bugreporter
namespace  categories
namespace  check
namespace  cocoa
namespace  coreFoundation
namespace  eval
namespace  loc
namespace  nonloc
namespace  objc_retain
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
 Prints path notes when a message is sent to a nil receiver. More...
class  ConditionBRVisitor
 Visitor that tries to report interesting diagnostics from conditions. More...
class  LikelyFalsePositiveSuppressionBRVisitor
 Suppress reports that might lead to known false positives. More...
class  UndefOrNullArgVisitor
 When a region containing undefined value or '0' value is passed as an argument in a call, marks the call as interesting. More...
class  SuppressInlineDefensiveChecksVisitor
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  CheckerProgramPointTag
class  Checker< check::_VoidCheck >
class  Checker
class  EventDispatcher
struct  ImplicitNullDerefEvent
 We dereferenced a location that may be null. More...
struct  DefaultBool
 A helper class which wraps a boolean value set to false by default. More...
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  CheckName
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  CallEventRef
class  RuntimeDefinition
 Defines the runtime definition of the called function. More...
class  CallEvent
 Represents an abstract call to a function or method along a particular path. More...
class  AnyFunctionCall
 Represents a call to any sort of function that might have a FunctionDecl. More...
class  SimpleFunctionCall
 Represents a C function or static C++ member function call. More...
class  CheckerContext
class  ConditionTruthVal
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 its 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  DynamicTypeInfo
 Stores the currently inferred strictest bound on the runtime type of a region in a given state along the analysis path. More...
class  EnvironmentEntry
class  Environment
 An immutable map from EnvironemntEntries to SVals. More...
class  EnvironmentManager
class  ExplodedNode
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  RegionAndSymbolInvalidationTraits
 Information about invalidation for a particular region/symbol. 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 * >
struct  ProgramStatePartialTrait< const void * >
class  StoreManager
class  StoreRef
class  SubEngine
class  SummaryManagerImpl
class  SummaryManager
class  SValBuilder
class  SVal
class  UndefinedVal
class  DefinedOrUnknownSVal
class  UnknownVal
class  DefinedSVal
class  KnownSVal
 Represents an SVal that is guaranteed to not be UnknownVal. More...
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  BinarySymExpr
 Represents a symbolic expression involving a binary operator. More...
class  SymIntExpr
 Represents a symbolic expression like 'x' + 3. More...
class  IntSymExpr
 Represents a symbolic expression like 3 - 'x'. More...
class  SymSymExpr
 Represents a 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  AnalysisASTConsumer
class  AnalysisAction
class  ParseModelFileAction
 Frontend action to parse model files. More...
class  ModelConsumer
 ASTConsumer to consume model files' AST. More...
class  CheckerDocumentation
class  PrettyStackTraceLocationContext
class  SimpleConstraintManager
class  ModelInjector

Typedefs

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

Enumerations

enum  PointerEscapeKind { PSK_EscapeOnBind, PSK_DirectEscapeOnCall, PSK_IndirectEscapeOnCall, PSK_EscapeOther }
 Describes the different reasons a pointer escapes during analysis. More...
enum  CallEventKind {
  CE_Function, CE_CXXMember, CE_CXXMemberOperator, CE_CXXDestructor,
  CE_BEG_CXX_INSTANCE_CALLS = CE_CXXMember, CE_END_CXX_INSTANCE_CALLS = CE_CXXDestructor, CE_CXXConstructor, CE_CXXAllocator,
  CE_BEG_FUNCTION_CALLS = CE_Function, CE_END_FUNCTION_CALLS = CE_CXXAllocator, CE_Block, CE_ObjCMessage
}

Functions

void registerBuiltinCheckers (CheckerRegistry &registry)
void RegisterCallInliner (ExprEngine &Eng)
raw_ostream & operator<< (raw_ostream &Out, const CheckerBase &Checker)
 Dump checker name to stream.
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)
std::unique_ptr
< ConstraintManager
CreateRangeConstraintManager (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.
std::unique_ptr< StoreManagerCreateRegionStoreManager (ProgramStateManager &StMgr)
std::unique_ptr< StoreManagerCreateFieldsOnlyRegionStoreManager (ProgramStateManager &StMgr)
SValBuildercreateSimpleSValBuilder (llvm::BumpPtrAllocator &alloc, ASTContext &context, ProgramStateManager &stateMgr)
std::unique_ptr
< AnalysisASTConsumer
CreateAnalysisConsumer (CompilerInstance &CI)
std::unique_ptr< CheckerManagercreateCheckerManager (AnalyzerOptions &opts, const LangOptions &langOpts, ArrayRef< std::string > plugins, DiagnosticsEngine &diags)
void printCheckerHelp (raw_ostream &OS, ArrayRef< std::string > plugins)
bool shouldIncludeAllocationSiteInLeakDiagnostics (AnalyzerOptions &AOpts)
 Returns true if leak diagnostics should directly reference the allocatin site (where possible).
void registerCStringCheckerBasic (CheckerManager &Mgr)
 Register the checker which evaluates CString API calls.
static Selector getKeywordSelectorImpl (ASTContext &Ctx, const char *First, va_list argp)
static Selector getKeywordSelector (ASTContext &Ctx, va_list argp)
static LLVM_END_WITH_NULL Selector getKeywordSelector (ASTContext &Ctx, const char *First,...)
static LLVM_END_WITH_NULL void lazyInitKeywordSelector (Selector &Sel, ASTContext &Ctx, const char *First,...)
static void lazyInitNullarySelector (Selector &Sel, ASTContext &Ctx, const char *Name)
static void computeAdjustment (SymbolRef &Sym, llvm::APSInt &Adjustment)

Variables

static const TaintTagType TaintTagGeneric = 0

Typedef Documentation

Definition at line 42 of file ProgramState.h.

typedef llvm::DenseMap<const ExplodedNode *, const ExplodedNode *> clang::ento::InterExplodedGraphMap

Definition at line 247 of file ExplodedGraph.h.

typedef llvm::DenseSet<SymbolRef> clang::ento::InvalidatedSymbols

Definition at line 36 of file Store.h.

Definition at line 128 of file PathDiagnostic.h.

Definition at line 27 of file PathDiagnosticConsumers.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 29 of file FunctionSummary.h.

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

Definition at line 28 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 44 of file ProgramState.h.

Definition at line 101 of file SymbolManager.h.

Definition at line 46 of file PathDiagnostic.h.

Definition at line 99 of file SymbolManager.h.

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

Definition at line 32 of file TaintManager.h.

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

Definition at line 22 of file TaintTag.h.


Enumeration Type Documentation

Enumerator:
CE_Function 
CE_CXXMember 
CE_CXXMemberOperator 
CE_CXXDestructor 
CE_BEG_CXX_INSTANCE_CALLS 
CE_END_CXX_INSTANCE_CALLS 
CE_CXXConstructor 
CE_CXXAllocator 
CE_BEG_FUNCTION_CALLS 
CE_END_FUNCTION_CALLS 
CE_Block 
CE_ObjCMessage 

Definition at line 34 of file CallEvent.h.

Describes the different reasons a pointer escapes during analysis.

Enumerator:
PSK_EscapeOnBind 

A pointer escapes due to binding its value to a location that the analyzer cannot track.

PSK_DirectEscapeOnCall 

The pointer has been passed to a function call directly.

PSK_IndirectEscapeOnCall 

The pointer has been passed to a function indirectly. For example, the pointer is accessible through an argument to a function.

PSK_EscapeOther 

The reason for pointer escape is unknown. For example, a region containing this pointer is invalidated.

Definition at line 117 of file CheckerManager.h.


Function Documentation

static void clang::ento::computeAdjustment ( SymbolRef &  Sym,
llvm::APSInt &  Adjustment 
) [static]

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)
template<class T >
bool clang::ento::containsStmt ( const Stmt *  S)

Definition at line 27 of file CheckerHelpers.h.

References clang::Stmt::children().

std::unique_ptr< CheckerManager > clang::ento::createCheckerManager ( AnalyzerOptions opts,
const LangOptions langOpts,
ArrayRef< std::string >  plugins,
DiagnosticsEngine diags 
)

Definition at line 619 of file RegionStore.cpp.

std::unique_ptr< ConstraintManager > clang::ento::CreateRangeConstraintManager ( ProgramStateManager statemgr,
SubEngine subengine 
)

Definition at line 613 of file RegionStore.cpp.

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

Definition at line 52 of file SimpleSValBuilder.cpp.

static Selector clang::ento::getKeywordSelector ( ASTContext &  Ctx,
va_list  argp 
) [inline, static]

Definition at line 31 of file SelectorExtras.h.

References getKeywordSelectorImpl(), and va_arg.

static LLVM_END_WITH_NULL Selector clang::ento::getKeywordSelector ( ASTContext &  Ctx,
const char *  First,
  ... 
) [inline, static]

Definition at line 38 of file SelectorExtras.h.

References getKeywordSelectorImpl(), va_end, and va_start.

static Selector clang::ento::getKeywordSelectorImpl ( ASTContext &  Ctx,
const char *  First,
va_list  argp 
) [inline, static]
static LLVM_END_WITH_NULL void clang::ento::lazyInitKeywordSelector ( Selector &  Sel,
ASTContext &  Ctx,
const char *  First,
  ... 
) [inline, static]

Definition at line 48 of file SelectorExtras.h.

References getKeywordSelectorImpl(), clang::Selector::isNull(), va_end, and va_start.

static void clang::ento::lazyInitNullarySelector ( Selector &  Sel,
ASTContext &  Ctx,
const char *  Name 
) [inline, static]

Definition at line 58 of file SelectorExtras.h.

References clang::GetNullarySelector(), and clang::Selector::isNull().

raw_ostream & clang::ento::operator<< ( raw_ostream &  Out,
const CheckerBase Checker 
)

Dump checker name to stream.

Definition at line 34 of file Checker.cpp.

References clang::ento::CheckerBase::getCheckName(), and clang::ento::CheckName::getName().

void clang::ento::printCheckerHelp ( raw_ostream &  OS,
ArrayRef< std::string >  plugins 
)

Definition at line 131 of file CheckerRegistration.cpp.

Referenced by clang::ExecuteCompilerInvocation().

Decrement the number of times this state is referenced.

Definition at line 33 of file ProgramState.cpp.

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

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

Increments the number of times this state is referenced.

Definition at line 28 of file ProgramState.cpp.

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

Definition at line 26 of file ClangCheckers.cpp.

void clang::ento::RegisterCallInliner ( ExprEngine &  Eng)

Register the checker which evaluates CString API calls.

Definition at line 2088 of file CStringChecker.cpp.

Returns true if leak diagnostics should directly reference the allocatin site (where possible).

The default is false.

Definition at line 19 of file AllocationDiagnostics.cpp.

References clang::AnalyzerOptions::getBooleanOption().


Variable Documentation

Definition at line 23 of file TaintTag.h.