clang  14.0.0git
Namespaces | Classes | Typedefs | Enumerations | Functions
clang::ento Namespace Reference

Namespaces

 allocation_state
 
 bugreporter
 
 categories
 
 check
 
 checker_registry
 
 cocoa
 
 coreFoundation
 
 eval
 
 iterator
 
 loc
 
 move
 
 mpi
 
 nonloc
 
 retaincountchecker
 
 smartptr
 
 summMgr
 
 taint
 

Classes

class  AllocaRegion
 AllocaRegion - A region that represents an untyped blob of bytes created by a call to 'alloca'. More...
 
class  AnalysisAction
 
class  AnalysisASTConsumer
 
class  AnalysisManager
 
class  AnyCXXConstructorCall
 Represents any constructor invocation. More...
 
class  AnyFunctionCall
 Represents a call to any sort of function that might have a FunctionDecl. More...
 
class  APSIntType
 A record of the "type" of an APSInt, used for conversions. More...
 
class  ArgEffect
 An ArgEffect summarizes the retain count behavior on an argument or receiver to a function or method. More...
 
class  BasicBugReport
 
class  BasicValueFactory
 
class  BinarySymExpr
 Represents a symbolic expression involving a binary operator. More...
 
class  BinarySymExprImpl
 Template implementation for all binary symbolic expressions. More...
 
class  BlockCall
 Represents a call to a block. More...
 
class  BlockCodeRegion
 BlockCodeRegion - A region that represents code texts of blocks (closures). More...
 
class  BlockCounter
 
class  BlockDataRegion
 BlockDataRegion - A region that represents a block instance. More...
 
class  BranchNodeBuilder
 BranchNodeBuilder is responsible for constructing the nodes corresponding to the two branches of the if statement - true and false. More...
 
class  BugReport
 This class provides an interface through which checkers can create individual bug reports. More...
 
class  BugReportEquivClass
 
class  BugReporter
 BugReporter is a utility class for generating PathDiagnostics for analysis. More...
 
class  BugReporterContext
 
class  BugReporterData
 
class  BugReporterVisitor
 BugReporterVisitors are used to add custom diagnostics along a path. More...
 
class  BugType
 
class  BuiltinBug
 
class  CallDescription
 This class represents a description of a function call using the number of arguments and the name of the function. More...
 
class  CallDescriptionMap
 An immutable map from CallDescriptions to arbitrary data. More...
 
class  CallEvent
 Represents an abstract call to a function or method along a particular path. More...
 
class  CallEventManager
 Manages the lifetime of CallEvent objects. More...
 
class  CallEventRef
 
class  Checker
 
class  Checker< CHECK1 >
 
class  CheckerBase
 
class  CheckerContext
 
class  CheckerDocumentation
 This checker documents the callback functions checkers can use to implement the custom handling of the specific events during path exploration as well as reporting bugs. More...
 
class  CheckerFn
 
class  CheckerFn< RET(Ps...)>
 
struct  CheckerInfo
 Specifies a checker. More...
 
class  CheckerManager
 
class  CheckerNameRef
 This wrapper is used to ensure that only StringRefs originating from the CheckerRegistry are used as check names. More...
 
class  CheckerProgramPointTag
 Tag that can use a checker name as a message provider (see SimpleProgramPointTag). More...
 
class  CheckerRegistry
 Manages a set of available checkers for running a static analysis. More...
 
struct  CheckerRegistryData
 
struct  CmdLineOption
 Specifies a command line option. More...
 
class  CodeSpaceRegion
 CodeSpaceRegion - The memory space that holds the executable code of functions and blocks. More...
 
class  CodeTextRegion
 
class  CompoundLiteralRegion
 CompoundLiteralRegion - A memory region representing a compound literal. More...
 
class  CompoundValData
 
class  ConditionBRVisitor
 Visitor that tries to report interesting diagnostics from conditions. More...
 
class  ConditionTruthVal
 
class  ConstraintManager
 
class  CoreEngine
 CoreEngine - Implements the core logic of the graph-reachability analysis. More...
 
class  CXXAllocatorCall
 Represents the memory allocation call in a C++ new-expression. More...
 
class  CXXBaseObjectRegion
 
class  CXXConstructorCall
 Represents a call to a C++ constructor. More...
 
class  CXXDeallocatorCall
 Represents the memory deallocation call in a C++ delete-expression. More...
 
class  CXXDerivedObjectRegion
 
class  CXXDestructorCall
 Represents an implicit call to a C++ destructor. More...
 
class  CXXInheritedConstructorCall
 Represents a call to a C++ inherited constructor. More...
 
class  CXXInstanceCall
 Represents a non-static C++ member function call, no matter how it is written. More...
 
class  CXXMemberCall
 Represents a non-static C++ member function call. More...
 
class  CXXMemberOperatorCall
 Represents a C++ overloaded operator call where the operator is implemented as a non-static member function. More...
 
class  CXXTempObjectRegion
 
class  CXXThisRegion
 CXXThisRegion - Represents the region for the implicit 'this' parameter in a call to a C++ method. More...
 
class  DataTag
 The tag that carries some information with it. More...
 
class  DeclRegion
 
struct  DefaultBool
 A helper class which wraps a boolean value set to false by default. More...
 
class  DefinedOrUnknownSVal
 
class  DefinedSVal
 
class  DynamicCastInfo
 
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  ElementRegion
 ElementRegion is used to represent both array elements and casts. More...
 
class  Environment
 An immutable map from EnvironemntEntries to SVals. More...
 
class  EnvironmentEntry
 An entry in the environment consists of a Stmt and an LocationContext. More...
 
class  EnvironmentManager
 
struct  EvalCallOptions
 Hints for figuring out of a call should be inlined during evalCall(). More...
 
class  EventDispatcher
 
class  ExplodedGraph
 
class  ExplodedNode
 
class  ExplodedNodeSet
 
class  ExprEngine
 
class  FalsePositiveRefutationBRVisitor
 The bug visitor will walk all the nodes in a path and collect all the constraints. More...
 
class  FieldChainInfo
 Represents a field chain. More...
 
class  FieldNode
 A lightweight polymorphic wrapper around FieldRegion *. More...
 
class  FieldRegion
 
class  FindUninitializedFields
 Searches for and stores uninitialized fields in a non-union object. More...
 
class  FullSValVisitor
 FullSValVisitor - a convenient mixed visitor for all three: SVal, SymExpr and MemRegion subclasses. More...
 
class  FunctionCodeRegion
 FunctionCodeRegion - A region that represents code texts of function. More...
 
class  FunctionSummariesTy
 
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). 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  GlobalsSpaceRegion
 
class  GlobalSystemSpaceRegion
 The region containing globals which are defined in system/external headers and are considered modifiable by system calls (ex: errno). More...
 
class  HeapSpaceRegion
 
struct  ImplicitNullDerefEvent
 We dereferenced a location that may be null. More...
 
class  IndirectGotoNodeBuilder
 
class  KnownSVal
 Represents an SVal that is guaranteed to not be UnknownVal. More...
 
class  LazyCompoundValData
 
class  LikelyFalsePositiveSuppressionBRVisitor
 Suppress reports that might lead to known false positives. More...
 
class  Loc
 
class  MemRegion
 MemRegion - The root abstract class for all memory regions. More...
 
class  MemRegionManager
 
class  MemRegionVisitor
 MemRegionVisitor - this class implements a simple visitor for MemRegion subclasses. More...
 
class  MemSpaceRegion
 MemSpaceRegion - A memory region that represents a "memory space"; for example, the set of global variables, the stack frame, etc. More...
 
class  ModelConsumer
 ASTConsumer to consume model files' AST. More...
 
class  ModelInjector
 
class  NilReceiverBRVisitor
 
class  NodeBuilder
 
struct  NodeBuilderContext
 
class  NodeBuilderWithSinks
 
class  NonLoc
 
class  NonParamVarRegion
 
class  NonStaticGlobalSpaceRegion
 The region for all the non-static global variables. More...
 
class  NoStateChangeFuncVisitor
 Put a diagnostic on return statement (or on } in its absence) of all inlined functions for which some property remained unchanged. More...
 
class  NoteTag
 The tag upon which the TagVisitor reacts. More...
 
class  ObjCIvarRegion
 
class  ObjCMethodCall
 Represents any expression that calls an Objective-C method. More...
 
class  ObjCStringRegion
 The region associated with an ObjCStringLiteral. More...
 
class  ObjCSummaryCache
 
class  ObjCSummaryKey
 A key identifying a summary. More...
 
class  OperatorKind
 
struct  PackageInfo
 Specifies a package. More...
 
class  ParamVarRegion
 ParamVarRegion - Represents a region for paremters. More...
 
class  ParseModelFileAction
 Frontend action to parse model files. More...
 
class  PathDiagnostic
 PathDiagnostic - PathDiagnostic objects represent a single path-sensitive diagnostic. More...
 
class  PathDiagnosticCallPiece
 
class  PathDiagnosticConsumer
 
struct  PathDiagnosticConsumerOptions
 These options tweak the behavior of path diangostic consumers. More...
 
class  PathDiagnosticControlFlowPiece
 
class  PathDiagnosticEventPiece
 
class  PathDiagnosticLocation
 
class  PathDiagnosticLocationPair
 
class  PathDiagnosticMacroPiece
 
class  PathDiagnosticNotePiece
 
class  PathDiagnosticPiece
 
class  PathDiagnosticPopUpPiece
 
class  PathDiagnosticRange
 
class  PathDiagnosticSpotPiece
 
class  PathPieces
 
class  PathSensitiveBugReport
 
class  PathSensitiveBugReporter
 GRBugReporter is used for generating path-sensitive reports. More...
 
class  PointerToMemberData
 
class  PrettyStackTraceLocationContext
 While alive, includes the current analysis stack in a crash trace. More...
 
class  ProgramState
 
class  ProgramStateManager
 
struct  ProgramStatePartialTrait
 
struct  ProgramStatePartialTrait< bool >
 
struct  ProgramStatePartialTrait< const void * >
 
struct  ProgramStatePartialTrait< llvm::ImmutableList< T > >
 
struct  ProgramStatePartialTrait< llvm::ImmutableMap< Key, Data, Info > >
 
struct  ProgramStatePartialTrait< llvm::ImmutableSet< Key, Info > >
 
struct  ProgramStatePartialTrait< unsigned >
 
struct  ProgramStatePartialTrait< void * >
 
struct  ProgramStateTrait
 
struct  ProgramStateTrait< iterator::ContainerMap >
 
struct  ProgramStateTrait< iterator::IteratorRegionMap >
 
struct  ProgramStateTrait< iterator::IteratorSymbolMap >
 
struct  ProgramStateTrait< mpi::RequestMap >
 
struct  ProgramStateTrait< ReplayWithoutInlining >
 
class  Range
 A Range represents the closed range [from, to]. More...
 
class  RangedConstraintManager
 
class  RangeSet
 
class  RegionAndSymbolInvalidationTraits
 Information about invalidation for a particular region/symbol. More...
 
class  RegionOffset
 Represent a region's offset within the top level base region. More...
 
class  RegionRawOffset
 
struct  ReplayWithoutInlining
 Traits for storing the call processing policy inside GDM. More...
 
class  RetainSummary
 Summary for a function with respect to ownership changes. More...
 
class  RetainSummaryManager
 
class  RetainSummaryTemplate
 
class  RetEffect
 RetEffect summarizes a call's retain/release behavior with respect to its return value. More...
 
class  RuntimeDefinition
 
class  ScanReachableSymbols
 
class  SimpleConstraintManager
 
class  SimpleFunctionCall
 Represents a C function or static C++ member function call. More...
 
class  SMTConstraintManager
 
class  SMTConv
 
class  StackArgumentsSpaceRegion
 
class  StackHintGenerator
 Interface for classes constructing Stack hints. More...
 
class  StackHintGeneratorForSymbol
 Constructs a Stack hint for the given symbol. More...
 
class  StackLocalsSpaceRegion
 
class  StackSpaceRegion
 
class  StaticGlobalSpaceRegion
 The region of the static variables within the current CodeTextRegion scope. More...
 
class  StmtNodeBuilder
 
class  StoreManager
 
class  StoreRef
 
class  StringRegion
 StringRegion - Region associated with a StringLiteral. More...
 
class  SubRegion
 SubRegion - A region that subsets another larger region. More...
 
class  SummaryManager
 
class  SummaryManagerImpl
 
class  SuppressInlineDefensiveChecksVisitor
 
class  SVal
 SVal - This represents a symbolic expression, which can be either an L-value or an R-value. More...
 
class  SValBuilder
 
class  SValExplainer
 
class  SValVisitor
 SValVisitor - this class implements a simple visitor for SVal subclasses. More...
 
class  SwitchNodeBuilder
 
class  SymbolCast
 Represents a cast expression. More...
 
class  SymbolConjured
 A symbol representing the result of an expression in the case when we do not know anything about what the expression is. More...
 
class  SymbolData
 A symbol representing data which can be stored in a memory location (region). More...
 
class  SymbolDerived
 A symbol representing the value of a MemRegion whose parent region has symbolic value. More...
 
class  SymbolExtent
 SymbolExtent - Represents the extent (size in bytes) of a bounded region. More...
 
class  SymbolicRegion
 SymbolicRegion - A special, "non-concrete" region. More...
 
class  SymbolManager
 
class  SymbolMetadata
 SymbolMetadata - Represents path-dependent metadata about a specific region. More...
 
class  SymbolReaper
 A class responsible for cleaning up unused symbols. More...
 
class  SymbolRegionValue
 A symbol representing the value stored at a MemRegion. More...
 
class  SymbolVisitor
 
class  SymExpr
 Symbolic value. More...
 
class  SymExprVisitor
 SymExprVisitor - this class implements a simple visitor for SymExpr subclasses. More...
 
class  TagVisitor
 The visitor detects NoteTags and displays the event notes they contain. More...
 
class  TrackConstraintBRVisitor
 
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  UndefinedVal
 
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...
 
struct  UninitObjCheckerOptions
 
class  UnknownSpaceRegion
 
class  UnknownVal
 
class  VarRegion
 
class  WorkList
 
class  WorkListUnit
 

Typedefs

using LocationOrAnalysisDeclContext = llvm::PointerUnion< const LocationContext *, AnalysisDeclContext * >
 
using PathDiagnosticPieceRef = std::shared_ptr< PathDiagnosticPiece >
 
using FilesToLineNumsMap = std::map< FileID, std::set< unsigned > >
 File IDs mapped to sets of line numbers. More...
 
typedef llvm::ImmutableMap< unsigned, ArgEffectArgEffects
 ArgEffects summarizes the effects of a function/method call on all of its arguments. More...
 
using DiagnosticForConsumerMapTy = llvm::DenseMap< PathDiagnosticConsumer *, std::unique_ptr< PathDiagnostic > >
 A mapping from diagnostic consumers to the diagnostics they should consume. More...
 
using RegisterCheckerFn = void(*)(CheckerManager &)
 Initialization functions perform any necessary setup for a checker. More...
 
using ShouldRegisterFunction = bool(*)(const CheckerManager &)
 
using CmdLineOptionList = llvm::SmallVector< CmdLineOption, 0 >
 
using CheckerInfoList = std::vector< CheckerInfo >
 
using CheckerInfoListRange = llvm::iterator_range< CheckerInfoList::iterator >
 
using ConstCheckerInfoList = llvm::SmallVector< const CheckerInfo *, 0 >
 
using CheckerInfoSet = llvm::SetVector< const CheckerInfo * >
 
using StateFromCmdLine = CheckerInfo::StateFromCmdLine
 
using PackageInfoList = llvm::SmallVector< PackageInfo, 0 >
 
typedef std::vector< PathDiagnosticConsumer * > PathDiagnosticConsumers
 
using InterExplodedGraphMap = llvm::DenseMap< const ExplodedNode *, const ExplodedNode * >
 
using SetOfDecls = std::deque< Decl * >
 
using SetOfConstDecls = llvm::DenseSet< const Decl * >
 
typedef std::unique_ptr< ConstraintManager >(* ConstraintManagerCreator) (ProgramStateManager &, ExprEngine *)
 
typedef std::unique_ptr< StoreManager >(* StoreManagerCreator) (ProgramStateManager &)
 
typedef IntrusiveRefCntPtr< const ProgramStateProgramStateRef
 
using ConstraintMap = llvm::ImmutableMap< SymbolRef, RangeSet >
 
using InvalidatedSymbols = llvm::DenseSet< SymbolRef >
 
using Store = const void *
 Store - This opaque type encapsulates an immutable mapping from locations to values. More...
 
using SymIntExpr = BinarySymExprImpl< const SymExpr *, const llvm::APSInt &, SymExpr::Kind::SymIntExprKind >
 Represents a symbolic expression like 'x' + 3. More...
 
using IntSymExpr = BinarySymExprImpl< const llvm::APSInt &, const SymExpr *, SymExpr::Kind::IntSymExprKind >
 Represents a symbolic expression like 3 - 'x'. More...
 
using SymSymExpr = BinarySymExprImpl< const SymExpr *, const SymExpr *, SymExpr::Kind::SymSymExprKind >
 Represents a symbolic expression like 'x' + 'y'. More...
 
using SymbolRef = const SymExpr *
 
using SymbolRefSmallVectorTy = SmallVector< SymbolRef, 2 >
 
using SymbolID = unsigned
 
using UninitFieldMap = std::map< const FieldRegion *, llvm::SmallString< 50 > >
 

Enumerations

enum  ObjKind {
  ObjKind::CF, ObjKind::ObjC, ObjKind::AnyObj, ObjKind::Generalized,
  ObjKind::OS
}
 Determines the object kind of a tracked object. More...
 
enum  ArgEffectKind {
  DoNothing, Autorelease, Dealloc, DecRef,
  DecRefBridgedTransferred, IncRef, UnretainedOutParameter, RetainedOutParameter,
  RetainedOutParameterOnZero, RetainedOutParameterOnNonZero, MayEscape, StopTracking,
  StopTrackingHard, DecRefAndStopTrackingHard
}
 
enum  PointerEscapeKind {
  PSK_EscapeOnBind, PSK_DirectEscapeOnCall, PSK_IndirectEscapeOnCall, PSK_EscapeOutParameters,
  PSK_EscapeOther
}
 Describes the different reasons a pointer escapes during analysis. More...
 
enum  ObjCMessageVisitKind { ObjCMessageVisitKind::Pre, ObjCMessageVisitKind::Post, ObjCMessageVisitKind::MessageNil }
 
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_CXXInheritedConstructor,
  CE_BEG_CXX_CONSTRUCTOR_CALLS = CE_CXXConstructor, CE_END_CXX_CONSTRUCTOR_CALLS = CE_CXXInheritedConstructor, CE_CXXAllocator, CE_CXXDeallocator,
  CE_BEG_FUNCTION_CALLS = CE_Function, CE_END_FUNCTION_CALLS = CE_CXXDeallocator, CE_Block, CE_ObjCMessage
}
 
enum  ObjCMessageKind { OCM_PropertyAccess, OCM_Subscript, OCM_Message }
 Represents the ways an Objective-C message send can occur. More...
 
enum  CallDescriptionFlags : int { CDF_MaybeBuiltin = 1 << 0 }
 
enum  Nullability : char { Nullability::Contradicted, Nullability::Nullable, Nullability::Unspecified, Nullability::Nonnull }
 

Functions

void RegisterCallInliner (ExprEngine &Eng)
 
raw_ostream & operator<< (raw_ostream &Out, const CheckerBase &Checker)
 Dump checker name to stream. More...
 
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::pair< const clang::VarDecl *, const clang::Expr * > parseAssignment (const Stmt *S)
 
Nullability getNullabilityAnnotation (QualType Type)
 Get nullability annotation for a given type. More...
 
llvm::Optional< inttryExpandAsInteger (StringRef Macro, const Preprocessor &PP)
 Try to parse the value of a defined preprocessor macro. More...
 
OperatorKind operationKindFromOverloadedOperator (OverloadedOperatorKind OOK, bool IsBinary)
 
std::unique_ptr< ConstraintManagerCreateRangeConstraintManager (ProgramStateManager &statemgr, ExprEngine *exprengine)
 
std::unique_ptr< ConstraintManagerCreateZ3ConstraintManager (ProgramStateManager &statemgr, ExprEngine *exprengine)
 
DefinedOrUnknownSVal getDynamicExtent (ProgramStateRef State, const MemRegion *MR, SValBuilder &SVB)
 
DefinedOrUnknownSVal getElementExtent (QualType Ty, SValBuilder &SVB)
 
DefinedOrUnknownSVal getDynamicElementCount (ProgramStateRef State, const MemRegion *MR, SValBuilder &SVB, QualType Ty)
 
ProgramStateRef setDynamicExtent (ProgramStateRef State, const MemRegion *MR, DefinedOrUnknownSVal Extent, SValBuilder &SVB)
 Set the dynamic extent Extent of the region MR. More...
 
SVal getDynamicExtentWithOffset (ProgramStateRef State, SVal BufV)
 Get the dynamic extent for a symbolic value that represents a buffer. More...
 
DynamicTypeInfo getDynamicTypeInfo (ProgramStateRef State, const MemRegion *MR)
 Get dynamic type information for the region MR. More...
 
const DynamicTypeInfogetRawDynamicTypeInfo (ProgramStateRef State, const MemRegion *MR)
 Get raw dynamic type information for the region MR. More...
 
DynamicTypeInfo getClassObjectDynamicTypeInfo (ProgramStateRef State, SymbolRef Sym)
 Get dynamic type information stored in a class object represented by Sym. More...
 
const DynamicCastInfogetDynamicCastInfo (ProgramStateRef State, const MemRegion *MR, QualType CastFromTy, QualType CastToTy)
 Get dynamic cast information from CastFromTy to CastToTy of MR. More...
 
ProgramStateRef setDynamicTypeInfo (ProgramStateRef State, const MemRegion *MR, DynamicTypeInfo NewTy)
 Set dynamic type information of the region; return the new state. More...
 
ProgramStateRef setDynamicTypeInfo (ProgramStateRef State, const MemRegion *MR, QualType NewTy, bool CanBeSubClassed=true)
 Set dynamic type information of the region; return the new state. More...
 
ProgramStateRef setClassObjectDynamicTypeInfo (ProgramStateRef State, SymbolRef Sym, DynamicTypeInfo NewTy)
 Set constraint on a type contained in a class object; return the new state. More...
 
ProgramStateRef setClassObjectDynamicTypeInfo (ProgramStateRef State, SymbolRef Sym, QualType NewTy, bool CanBeSubClassed=true)
 Set constraint on a type contained in a class object; return the new state. More...
 
ProgramStateRef setDynamicTypeAndCastInfo (ProgramStateRef State, const MemRegion *MR, QualType CastFromTy, QualType CastToTy, bool IsCastSucceeds)
 Set dynamic type and cast information of the region; return the new state. More...
 
ProgramStateRef removeDeadTypes (ProgramStateRef State, SymbolReaper &SR)
 Removes the dead type informations from State. More...
 
ProgramStateRef removeDeadCasts (ProgramStateRef State, SymbolReaper &SR)
 Removes the dead cast informations from State. More...
 
ProgramStateRef removeDeadClassObjectTypes (ProgramStateRef State, SymbolReaper &SR)
 Removes the dead Class object type informations from State. More...
 
void printDynamicTypeInfoJson (raw_ostream &Out, ProgramStateRef State, const char *NL="\n", unsigned int Space=0, bool IsDot=false)
 
bool isUnrolledState (ProgramStateRef State)
 Returns if the given State indicates that is inside a completely unrolled loop. More...
 
ProgramStateRef updateLoopStack (const Stmt *LoopStmt, ASTContext &ASTCtx, ExplodedNode *Pred, unsigned maxVisitOnPath)
 Updates the stack of loops contained by the ProgramState. More...
 
ProgramStateRef processLoopEnd (const Stmt *LoopStmt, ProgramStateRef State)
 Updates the given ProgramState. More...
 
ProgramStateRef getWidenedLoopState (ProgramStateRef PrevState, const LocationContext *LCtx, unsigned BlockCount, const Stmt *LoopStmt)
 Get the states that result from widening the loop. More...
 
raw_ostream & operator<< (raw_ostream &os, const MemRegion *R)
 
void ProgramStateRetain (const ProgramState *state)
 Increments the number of times this state is referenced. More...
 
void ProgramStateRelease (const ProgramState *state)
 Decrement the number of times this state is referenced. More...
 
ConstraintMap getConstraintMap (ProgramStateRef State)
 
SymbolRef simplify (ProgramStateRef State, SymbolRef Sym)
 Try to simplify a given symbolic expression's associated value based on the constraints in State. More...
 
std::unique_ptr< StoreManagerCreateRegionStoreManager (ProgramStateManager &StMgr)
 
std::unique_ptr< StoreManagerCreateFieldsOnlyRegionStoreManager (ProgramStateManager &StMgr)
 
SValBuildercreateSimpleSValBuilder (llvm::BumpPtrAllocator &alloc, ASTContext &context, ProgramStateManager &stateMgr)
 
raw_ostream & operator<< (raw_ostream &os, clang::ento::SVal V)
 
raw_ostream & operator<< (raw_ostream &os, const clang::ento::SymExpr *SE)
 
std::unique_ptr< AnalysisASTConsumerCreateAnalysisConsumer (CompilerInstance &CI)
 CreateAnalysisConsumer - Creates an ASTConsumer to run various code analysis passes. More...
 
void printCheckerHelp (llvm::raw_ostream &OS, CompilerInstance &CI)
 
void printEnabledCheckerList (llvm::raw_ostream &OS, CompilerInstance &CI)
 
void printAnalyzerConfigList (llvm::raw_ostream &OS)
 
void printCheckerConfigList (llvm::raw_ostream &OS, CompilerInstance &CI)
 
void registerInnerPointerCheckerAux (CheckerManager &Mgr)
 Register the part of MallocChecker connected to InnerPointerChecker. More...
 
std::string getVariableName (const FieldDecl *Field)
 Returns with Field's name. More...
 
bool isPrimitiveType (const QualType &T)
 Returns true if T is a primitive type. More...
 
bool isDereferencableType (const QualType &T)
 
template<class T , class Checker >
llvm::Optional< T > getConfiguration (CheckerManager &Mgr, Checker *Chk, StringRef Option, StringRef ConfigFile)
 Read the given file from the filesystem and parse it as a yaml file. More...
 
static bool isLoopStmt (const Stmt *S)
 
static internal::Matcher< StmtsimpleCondition (StringRef BindName, StringRef RefName)
 
static internal::Matcher< StmtchangeIntBoundNode (internal::Matcher< Decl > VarNodeMatcher)
 
static internal::Matcher< StmtcallByRef (internal::Matcher< Decl > VarNodeMatcher)
 
static internal::Matcher< StmtassignedToRef (internal::Matcher< Decl > VarNodeMatcher)
 
static internal::Matcher< StmtgetAddrTo (internal::Matcher< Decl > VarNodeMatcher)
 
static internal::Matcher< StmthasSuspiciousStmt (StringRef NodeName)
 
static internal::Matcher< StmtforLoopMatcher ()
 
static bool isCapturedByReference (ExplodedNode *N, const DeclRefExpr *DR)
 
static bool isPossiblyEscaped (ExplodedNode *N, const DeclRefExpr *DR)
 
bool shouldCompletelyUnroll (const Stmt *LoopStmt, ASTContext &ASTCtx, ExplodedNode *Pred, unsigned &maxStep)
 
bool madeNewBranch (ExplodedNode *N, const Stmt *LoopStmt)
 

Typedef Documentation

◆ ArgEffects

typedef llvm::ImmutableMap<unsigned, ArgEffect> clang::ento::ArgEffects

ArgEffects summarizes the effects of a function/method call on all of its arguments.

Definition at line 279 of file RetainSummaryManager.h.

◆ CheckerInfoList

using clang::ento::CheckerInfoList = typedef std::vector<CheckerInfo>

Definition at line 87 of file CheckerRegistryData.h.

◆ CheckerInfoListRange

using clang::ento::CheckerInfoListRange = typedef llvm::iterator_range<CheckerInfoList::iterator>

Definition at line 88 of file CheckerRegistryData.h.

◆ CheckerInfoSet

using clang::ento::CheckerInfoSet = typedef llvm::SetVector<const CheckerInfo *>

Definition at line 90 of file CheckerRegistryData.h.

◆ CmdLineOptionList

Definition at line 83 of file CheckerRegistryData.h.

◆ ConstCheckerInfoList

Definition at line 89 of file CheckerRegistryData.h.

◆ ConstraintManagerCreator

typedef std::unique_ptr<ConstraintManager>(* clang::ento::ConstraintManagerCreator) (ProgramStateManager &, ExprEngine *)

Definition at line 41 of file ProgramState.h.

◆ ConstraintMap

using clang::ento::ConstraintMap = typedef llvm::ImmutableMap<SymbolRef, RangeSet>

Definition at line 313 of file RangedConstraintManager.h.

◆ DiagnosticForConsumerMapTy

using clang::ento::DiagnosticForConsumerMapTy = typedef llvm::DenseMap<PathDiagnosticConsumer *, std::unique_ptr<PathDiagnostic> >

A mapping from diagnostic consumers to the diagnostics they should consume.

Definition at line 73 of file BugReporter.h.

◆ FilesToLineNumsMap

File IDs mapped to sets of line numbers.

Definition at line 762 of file PathDiagnostic.h.

◆ InterExplodedGraphMap

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

Definition at line 302 of file ExplodedGraph.h.

◆ IntSymExpr

using clang::ento::IntSymExpr = typedef BinarySymExprImpl<const llvm::APSInt &, const SymExpr *, SymExpr::Kind::IntSymExprKind>

Represents a symbolic expression like 3 - 'x'.

Definition at line 411 of file SymbolManager.h.

◆ InvalidatedSymbols

Definition at line 51 of file Store.h.

◆ LocationOrAnalysisDeclContext

using clang::ento::LocationOrAnalysisDeclContext = typedef llvm::PointerUnion<const LocationContext *, AnalysisDeclContext *>

Definition at line 195 of file PathDiagnostic.h.

◆ PackageInfoList

Definition at line 162 of file CheckerRegistryData.h.

◆ PathDiagnosticConsumers

Definition at line 33 of file PathDiagnosticConsumers.h.

◆ PathDiagnosticPieceRef

Definition at line 494 of file PathDiagnostic.h.

◆ ProgramStateRef

Definition at line 37 of file ProgramState_Fwd.h.

◆ RegisterCheckerFn

using clang::ento::RegisterCheckerFn = typedef void (*)(CheckerManager &)

Initialization functions perform any necessary setup for a checker.

They should include a call to CheckerManager::registerChecker.

Definition at line 39 of file CheckerRegistryData.h.

◆ SetOfConstDecls

Definition at line 31 of file FunctionSummary.h.

◆ SetOfDecls

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

Definition at line 30 of file FunctionSummary.h.

◆ ShouldRegisterFunction

Definition at line 40 of file CheckerRegistryData.h.

◆ StateFromCmdLine

Definition at line 142 of file CheckerRegistryData.h.

◆ Store

using clang::ento::Store = typedef const void *

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 27 of file StoreRef.h.

◆ StoreManagerCreator

typedef std::unique_ptr<StoreManager>(* clang::ento::StoreManagerCreator) (ProgramStateManager &)

Definition at line 43 of file ProgramState.h.

◆ SymbolID

Definition at line 112 of file SymExpr.h.

◆ SymbolRef

using clang::ento::SymbolRef = typedef const SymExpr *

Definition at line 110 of file SymExpr.h.

◆ SymbolRefSmallVectorTy

Definition at line 111 of file SymExpr.h.

◆ SymIntExpr

using clang::ento::SymIntExpr = typedef BinarySymExprImpl<const SymExpr *, const llvm::APSInt &, SymExpr::Kind::SymIntExprKind>

Represents a symbolic expression like 'x' + 3.

Definition at line 407 of file SymbolManager.h.

◆ SymSymExpr

using clang::ento::SymSymExpr = typedef BinarySymExprImpl<const SymExpr *, const SymExpr *, SymExpr::Kind::SymSymExprKind>

Represents a symbolic expression like 'x' + 'y'.

Definition at line 415 of file SymbolManager.h.

◆ UninitFieldMap

using clang::ento::UninitFieldMap = typedef std::map<const FieldRegion *, llvm::SmallString<50> >

Definition at line 194 of file UninitializedObject.h.

Enumeration Type Documentation

◆ ArgEffectKind

Enumerator
DoNothing 

There is no effect.

Autorelease 

The argument is treated as if an -autorelease message had been sent to the referenced object.

Dealloc 

The argument is treated as if the referenced object was deallocated.

DecRef 

The argument has its reference count decreased by 1.

DecRefBridgedTransferred 

The argument has its reference count decreased by 1 to model a transferred bridge cast under ARC.

IncRef 

The argument has its reference count increased by 1.

UnretainedOutParameter 

The argument is a pointer to a retain-counted object; on exit, the new value of the pointer is a +0 value.

RetainedOutParameter 

The argument is a pointer to a retain-counted object; on exit, the new value of the pointer is a +1 value.

RetainedOutParameterOnZero 

The argument is a pointer to a retain-counted object; on exit, the new value of the pointer is a +1 value iff the return code is zero.

RetainedOutParameterOnNonZero 

The argument is a pointer to a retain-counted object; on exit, the new value of the pointer is a +1 value iff the return code is non-zero.

MayEscape 

The argument is treated as potentially escaping, meaning that even when its reference count hits 0 it should be treated as still possibly being alive as someone else may be holding onto the object.

StopTracking 

All typestate tracking of the object ceases.

This is usually employed when the effect of the call is completely unknown.

StopTrackingHard 

All typestate tracking of the object ceases.

Unlike StopTracking, this is also enforced when the method body is inlined.

In some cases, we obtain a better summary for this checker by looking at the call site than by inlining the function. Signifies that we should stop tracking the symbol even if the function is inlined.

DecRefAndStopTrackingHard 

Performs the combined functionality of DecRef and StopTrackingHard.

The models the effect that the called function decrements the reference count of the argument and all typestate tracking on that argument should cease.

Definition at line 53 of file RetainSummaryManager.h.

◆ CallDescriptionFlags

Enumerator
CDF_MaybeBuiltin 

Describes a C standard function that is sometimes implemented as a macro that expands to a compiler builtin with some __builtin prefix.

The builtin may as well have a few extra arguments on top of the requested number of arguments.

Definition at line 1228 of file CallEvent.h.

◆ CallEventKind

Enumerator
CE_Function 
CE_CXXMember 
CE_CXXMemberOperator 
CE_CXXDestructor 
CE_BEG_CXX_INSTANCE_CALLS 
CE_END_CXX_INSTANCE_CALLS 
CE_CXXConstructor 
CE_CXXInheritedConstructor 
CE_BEG_CXX_CONSTRUCTOR_CALLS 
CE_END_CXX_CONSTRUCTOR_CALLS 
CE_CXXAllocator 
CE_CXXDeallocator 
CE_BEG_FUNCTION_CALLS 
CE_END_FUNCTION_CALLS 
CE_Block 
CE_ObjCMessage 

Definition at line 59 of file CallEvent.h.

◆ Nullability

enum clang::ento::Nullability : char
strong
Enumerator
Contradicted 
Nullable 
Unspecified 
Nonnull 

Definition at line 56 of file CheckerHelpers.h.

◆ ObjCMessageKind

Represents the ways an Objective-C message send can occur.

Enumerator
OCM_PropertyAccess 
OCM_Subscript 
OCM_Message 

Definition at line 1111 of file CallEvent.h.

◆ ObjCMessageVisitKind

Enumerator
Pre 
Post 
MessageNil 

Definition at line 121 of file CheckerManager.h.

◆ ObjKind

enum clang::ento::ObjKind
strong

Determines the object kind of a tracked object.

Enumerator
CF 

Indicates that the tracked object is a CF object.

ObjC 

Indicates that the tracked object is an Objective-C object.

AnyObj 

Indicates that the tracked object could be a CF or Objective-C object.

Generalized 

Indicates that the tracked object is a generalized object.

OS 

Indicates that the tracking object is a descendant of a referenced-counted OSObject, used in the Darwin kernel.

Definition at line 35 of file RetainSummaryManager.h.

◆ PointerEscapeKind

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_EscapeOutParameters 

Escape for a new symbol that was generated into a region that the analyzer cannot follow during a conservative call.

PSK_EscapeOther 

The reason for pointer escape is unknown.

For example, a region containing this pointer is invalidated.

Definition at line 79 of file CheckerManager.h.

Function Documentation

◆ assignedToRef()

static internal::Matcher<Stmt> clang::ento::assignedToRef ( internal::Matcher< Decl VarNodeMatcher)
static

◆ callByRef()

static internal::Matcher<Stmt> clang::ento::callByRef ( internal::Matcher< Decl VarNodeMatcher)
static

◆ changeIntBoundNode()

static internal::Matcher<Stmt> clang::ento::changeIntBoundNode ( internal::Matcher< Decl VarNodeMatcher)
static

◆ containsBuiltinOffsetOf()

bool clang::ento::containsBuiltinOffsetOf ( const Stmt S)

Definition at line 68 of file CheckerHelpers.cpp.

◆ containsEnum()

bool clang::ento::containsEnum ( const Stmt S)

Definition at line 38 of file CheckerHelpers.cpp.

◆ containsMacro()

bool clang::ento::containsMacro ( const Stmt S)

Definition at line 23 of file CheckerHelpers.cpp.

◆ containsStaticLocal()

bool clang::ento::containsStaticLocal ( const Stmt S)

Definition at line 52 of file CheckerHelpers.cpp.

◆ containsStmt()

template<class T >
bool clang::ento::containsStmt ( const Stmt S)

Definition at line 36 of file CheckerHelpers.h.

◆ CreateAnalysisConsumer()

std::unique_ptr< AnalysisASTConsumer > clang::ento::CreateAnalysisConsumer ( CompilerInstance CI)

◆ CreateFieldsOnlyRegionStoreManager()

std::unique_ptr< StoreManager > clang::ento::CreateFieldsOnlyRegionStoreManager ( ProgramStateManager StMgr)

Definition at line 673 of file RegionStore.cpp.

◆ CreateRangeConstraintManager()

std::unique_ptr< ConstraintManager > clang::ento::CreateRangeConstraintManager ( ProgramStateManager statemgr,
ExprEngine exprengine 
)

◆ CreateRegionStoreManager()

std::unique_ptr< StoreManager > clang::ento::CreateRegionStoreManager ( ProgramStateManager StMgr)

Definition at line 667 of file RegionStore.cpp.

◆ createSimpleSValBuilder()

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

Definition at line 52 of file SimpleSValBuilder.cpp.

◆ CreateZ3ConstraintManager()

std::unique_ptr< ConstraintManager > clang::ento::CreateZ3ConstraintManager ( ProgramStateManager statemgr,
ExprEngine exprengine 
)

◆ forLoopMatcher()

static internal::Matcher<Stmt> clang::ento::forLoopMatcher ( )
static

◆ getAddrTo()

static internal::Matcher<Stmt> clang::ento::getAddrTo ( internal::Matcher< Decl VarNodeMatcher)
static

◆ getClassObjectDynamicTypeInfo()

DynamicTypeInfo clang::ento::getClassObjectDynamicTypeInfo ( ProgramStateRef  State,
SymbolRef  Sym 
)

Get dynamic type information stored in a class object represented by Sym.

Referenced by clang::ento::ObjCMethodCall::getRuntimeDefinition(), and REGISTER_MAP_WITH_PROGRAMSTATE().

◆ getConfiguration()

template<class T , class Checker >
llvm::Optional<T> clang::ento::getConfiguration ( CheckerManager Mgr,
Checker Chk,
StringRef  Option,
StringRef  ConfigFile 
)

Read the given file from the filesystem and parse it as a yaml file.

The template parameter must have a yaml MappingTraits. Emit diagnostic error in case of any failure.

Definition at line 28 of file Yaml.h.

◆ getConstraintMap()

ConstraintMap clang::ento::getConstraintMap ( ProgramStateRef  State)

◆ getDynamicCastInfo()

const DynamicCastInfo* clang::ento::getDynamicCastInfo ( ProgramStateRef  State,
const MemRegion MR,
QualType  CastFromTy,
QualType  CastToTy 
)

Get dynamic cast information from CastFromTy to CastToTy of MR.

Referenced by addCastTransition(), addInstanceOfTransition(), and REGISTER_MAP_WITH_PROGRAMSTATE().

◆ getDynamicElementCount()

DefinedOrUnknownSVal clang::ento::getDynamicElementCount ( ProgramStateRef  State,
const MemRegion MR,
SValBuilder SVB,
QualType  Ty 
)
Returns
The stored element count of the region MR.

Referenced by isArrayIndexOutOfBounds(), and REGISTER_MAP_WITH_PROGRAMSTATE().

◆ getDynamicExtent()

DefinedOrUnknownSVal clang::ento::getDynamicExtent ( ProgramStateRef  State,
const MemRegion MR,
SValBuilder SVB 
)
Returns
The stored dynamic extent for the region MR.

Referenced by REGISTER_MAP_WITH_PROGRAMSTATE().

◆ getDynamicExtentWithOffset()

SVal clang::ento::getDynamicExtentWithOffset ( ProgramStateRef  State,
SVal  BufV 
)

Get the dynamic extent for a symbolic value that represents a buffer.

If there is an offsetting to the underlying buffer we consider that too. Returns with an SVal that represents the extent, this is Unknown if the engine cannot deduce the extent. E.g. char buf[3]; (buf); // extent is 3 (buf + 1); // extent is 2 (buf + 3); // extent is 0 (buf + 4); // extent is -1

char *bufptr; (bufptr) // extent is unknown

Referenced by REGISTER_MAP_WITH_PROGRAMSTATE().

◆ getDynamicTypeInfo()

DynamicTypeInfo clang::ento::getDynamicTypeInfo ( ProgramStateRef  State,
const MemRegion MR 
)

◆ getElementExtent()

DefinedOrUnknownSVal clang::ento::getElementExtent ( QualType  Ty,
SValBuilder SVB 
)

◆ getNullabilityAnnotation()

Nullability clang::ento::getNullabilityAnnotation ( QualType  Type)

Get nullability annotation for a given type.

Definition at line 102 of file CheckerHelpers.cpp.

References clang::Type::getAs(), Nonnull, Nullable, and Unspecified.

Referenced by checkValueAtLValForInvariantViolation().

◆ getRawDynamicTypeInfo()

const DynamicTypeInfo* clang::ento::getRawDynamicTypeInfo ( ProgramStateRef  State,
const MemRegion MR 
)

Get raw dynamic type information for the region MR.

Referenced by REGISTER_MAP_WITH_PROGRAMSTATE().

◆ getVariableName()

std::string clang::ento::getVariableName ( const FieldDecl Field)

Returns with Field's name.

This is a helper function to get the correct name even if Field is a captured lambda variable.

Definition at line 581 of file UninitializedObjectChecker.cpp.

References string().

◆ getWidenedLoopState()

ProgramStateRef clang::ento::getWidenedLoopState ( ProgramStateRef  PrevState,
const LocationContext LCtx,
unsigned  BlockCount,
const Stmt LoopStmt 
)

◆ hasSuspiciousStmt()

static internal::Matcher<Stmt> clang::ento::hasSuspiciousStmt ( StringRef  NodeName)
static

◆ isCapturedByReference()

static bool clang::ento::isCapturedByReference ( ExplodedNode N,
const DeclRefExpr DR 
)
static

◆ isDereferencableType()

bool clang::ento::isDereferencableType ( const QualType T)
inline

Definition at line 330 of file UninitializedObject.h.

References clang::Type::isAnyPointerType(), and clang::Type::isReferenceType().

Referenced by dereference().

◆ isLoopStmt()

static bool clang::ento::isLoopStmt ( const Stmt S)
static

Definition at line 71 of file LoopUnrolling.cpp.

Referenced by shouldCompletelyUnroll(), and updateLoopStack().

◆ isPossiblyEscaped()

static bool clang::ento::isPossiblyEscaped ( ExplodedNode N,
const DeclRefExpr DR 
)
static

◆ isPrimitiveType()

bool clang::ento::isPrimitiveType ( const QualType T)
inline

Returns true if T is a primitive type.

An object of a primitive type only needs to be analyzed as much as checking whether their value is undefined.

Definition at line 324 of file UninitializedObject.h.

References clang::Type::isAtomicType(), clang::Type::isBuiltinType(), clang::Type::isEnumeralType(), clang::Type::isFunctionType(), clang::Type::isScalarType(), and clang::Type::isVectorType().

◆ isUnrolledState()

bool clang::ento::isUnrolledState ( ProgramStateRef  State)

Returns if the given State indicates that is inside a completely unrolled loop.

Definition at line 337 of file LoopUnrolling.cpp.

References State.

Referenced by clang::ento::ExprEngine::processCFGBlockEntrance().

◆ madeNewBranch()

bool clang::ento::madeNewBranch ( ExplodedNode N,
const Stmt LoopStmt 
)

Definition at line 280 of file LoopUnrolling.cpp.

Referenced by updateLoopStack().

◆ operationKindFromOverloadedOperator()

OperatorKind clang::ento::operationKindFromOverloadedOperator ( OverloadedOperatorKind  OOK,
bool  IsBinary 
)

Definition at line 151 of file CheckerHelpers.cpp.

◆ operator<<() [1/4]

raw_ostream& clang::ento::operator<< ( raw_ostream &  os,
clang::ento::SVal  V 
)
inline

Definition at line 219 of file SVals.h.

References V.

◆ operator<<() [2/4]

raw_ostream& clang::ento::operator<< ( raw_ostream &  os,
const clang::ento::SymExpr SE 
)
inline

Definition at line 104 of file SymExpr.h.

References clang::ento::SymExpr::dumpToStream().

◆ operator<<() [3/4]

raw_ostream& clang::ento::operator<< ( raw_ostream &  os,
const MemRegion R 
)
inline

Definition at line 1556 of file MemRegion.h.

References clang::ento::MemRegion::dumpToStream().

◆ operator<<() [4/4]

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

Dump checker name to stream.

Definition at line 35 of file Checker.cpp.

References clang::ento::CheckerBase::getCheckerName(), and clang::ento::CheckerNameRef::getName().

◆ parseAssignment()

std::pair< const clang::VarDecl *, const clang::Expr * > clang::ento::parseAssignment ( const Stmt S)

Definition at line 81 of file CheckerHelpers.cpp.

◆ printAnalyzerConfigList()

void clang::ento::printAnalyzerConfigList ( llvm::raw_ostream &  OS)

◆ printCheckerConfigList()

void clang::ento::printCheckerConfigList ( llvm::raw_ostream &  OS,
CompilerInstance CI 
)

◆ printCheckerHelp()

void clang::ento::printCheckerHelp ( llvm::raw_ostream &  OS,
CompilerInstance CI 
)

◆ printDynamicTypeInfoJson()

void clang::ento::printDynamicTypeInfoJson ( raw_ostream &  Out,
ProgramStateRef  State,
const char *  NL = "\n",
unsigned int  Space = 0,
bool  IsDot = false 
)

◆ printEnabledCheckerList()

void clang::ento::printEnabledCheckerList ( llvm::raw_ostream &  OS,
CompilerInstance CI 
)

◆ processLoopEnd()

ProgramStateRef clang::ento::processLoopEnd ( const Stmt LoopStmt,
ProgramStateRef  State 
)

Updates the given ProgramState.

In current implementation it removes the top element of the stack of loops.

Definition at line 75 of file LoopUnrolling.cpp.

References State.

◆ ProgramStateRelease()

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

Decrement the number of times this state is referenced.

Definition at line 34 of file ProgramState.cpp.

References s, and state.

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

◆ ProgramStateRetain()

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

Increments the number of times this state is referenced.

Definition at line 29 of file ProgramState.cpp.

References state.

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

◆ RegisterCallInliner()

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

◆ registerInnerPointerCheckerAux()

void clang::ento::registerInnerPointerCheckerAux ( CheckerManager Mgr)

Register the part of MallocChecker connected to InnerPointerChecker.

Definition at line 3557 of file MallocChecker.cpp.

References clang::ento::CheckerManager::getChecker(), and clang::ento::CheckerManager::getCurrentCheckerName().

◆ removeDeadCasts()

ProgramStateRef clang::ento::removeDeadCasts ( ProgramStateRef  State,
SymbolReaper SR 
)

Removes the dead cast informations from State.

Referenced by REGISTER_MAP_WITH_PROGRAMSTATE().

◆ removeDeadClassObjectTypes()

ProgramStateRef clang::ento::removeDeadClassObjectTypes ( ProgramStateRef  State,
SymbolReaper SR 
)

Removes the dead Class object type informations from State.

Referenced by REGISTER_MAP_WITH_PROGRAMSTATE().

◆ removeDeadTypes()

ProgramStateRef clang::ento::removeDeadTypes ( ProgramStateRef  State,
SymbolReaper SR 
)

Removes the dead type informations from State.

Referenced by REGISTER_MAP_WITH_PROGRAMSTATE().

◆ setClassObjectDynamicTypeInfo() [1/2]

ProgramStateRef clang::ento::setClassObjectDynamicTypeInfo ( ProgramStateRef  State,
SymbolRef  Sym,
DynamicTypeInfo  NewTy 
)

Set constraint on a type contained in a class object; return the new state.

Referenced by REGISTER_MAP_WITH_PROGRAMSTATE().

◆ setClassObjectDynamicTypeInfo() [2/2]

ProgramStateRef clang::ento::setClassObjectDynamicTypeInfo ( ProgramStateRef  State,
SymbolRef  Sym,
QualType  NewTy,
bool  CanBeSubClassed = true 
)

Set constraint on a type contained in a class object; return the new state.

◆ setDynamicExtent()

ProgramStateRef clang::ento::setDynamicExtent ( ProgramStateRef  State,
const MemRegion MR,
DefinedOrUnknownSVal  Extent,
SValBuilder SVB 
)

Set the dynamic extent Extent of the region MR.

Referenced by clang::ento::ExprEngine::bindReturnValue(), and REGISTER_MAP_WITH_PROGRAMSTATE().

◆ setDynamicTypeAndCastInfo()

ProgramStateRef clang::ento::setDynamicTypeAndCastInfo ( ProgramStateRef  State,
const MemRegion MR,
QualType  CastFromTy,
QualType  CastToTy,
bool  IsCastSucceeds 
)

Set dynamic type and cast information of the region; return the new state.

Referenced by addCastTransition(), addInstanceOfTransition(), and REGISTER_MAP_WITH_PROGRAMSTATE().

◆ setDynamicTypeInfo() [1/2]

ProgramStateRef clang::ento::setDynamicTypeInfo ( ProgramStateRef  State,
const MemRegion MR,
DynamicTypeInfo  NewTy 
)

Set dynamic type information of the region; return the new state.

Referenced by recordFixedType(), and REGISTER_MAP_WITH_PROGRAMSTATE().

◆ setDynamicTypeInfo() [2/2]

ProgramStateRef clang::ento::setDynamicTypeInfo ( ProgramStateRef  State,
const MemRegion MR,
QualType  NewTy,
bool  CanBeSubClassed = true 
)

Set dynamic type information of the region; return the new state.

◆ shouldCompletelyUnroll()

bool clang::ento::shouldCompletelyUnroll ( const Stmt LoopStmt,
ASTContext ASTCtx,
ExplodedNode Pred,
unsigned maxStep 
)

Definition at line 248 of file LoopUnrolling.cpp.

References isLoopStmt().

Referenced by updateLoopStack().

◆ simpleCondition()

static internal::Matcher<Stmt> clang::ento::simpleCondition ( StringRef  BindName,
StringRef  RefName 
)
static

◆ simplify()

SymbolRef clang::ento::simplify ( ProgramStateRef  State,
SymbolRef  Sym 
)

Try to simplify a given symbolic expression's associated value based on the constraints in State.

This is needed because the Environment bindings are not getting updated when a new constraint is added to the State.

Definition at line 229 of file RangedConstraintManager.cpp.

References clang::ento::SVal::getAsSymbol(), clang::ento::SValBuilder::makeSymbolVal(), clang::ento::SValBuilder::simplifySVal(), and State.

Referenced by clang::ento::RangedConstraintManager::assumeSym(), clang::ento::RangedConstraintManager::assumeSymInclusiveRange(), and clang::ento::RangedConstraintManager::assumeSymUnsupported().

◆ tryExpandAsInteger()

llvm::Optional< int > clang::ento::tryExpandAsInteger ( StringRef  Macro,
const Preprocessor PP 
)

Try to parse the value of a defined preprocessor macro.

We can only parse simple expressions that consist of an optional minus sign token and then a token for an integer. If we cannot parse the value then None is returned.

Definition at line 113 of file CheckerHelpers.cpp.

References clang::Preprocessor::getIdentifierInfo(), clang::Token::getLength(), clang::Token::getLiteralData(), clang::Preprocessor::getMacroInfo(), clang::Token::isLiteral(), and clang::MacroInfo::tokens().

◆ updateLoopStack()

ProgramStateRef clang::ento::updateLoopStack ( const Stmt LoopStmt,
ASTContext ASTCtx,
ExplodedNode Pred,
unsigned  maxVisitOnPath 
)