clang: lib/StaticAnalyzer/Core/RegionStore.cpp File Reference (original) (raw)
Go to the source code of this file.
| Namespaces | |
|---|---|
| namespace | llvm |
| Diagnostic wrappers for TextAPI types for error reporting. |
| Typedefs | |
|---|---|
| typedef llvm::ImmutableMap< BindingKey, SVal > | ClusterBindings |
| typedef llvm::ImmutableMapRef< BindingKey, SVal > | ClusterBindingsRef |
| typedef std::pair< BindingKey, SVal > | BindingPair |
| typedef llvm::ImmutableMap< const MemRegion *, ClusterBindings > | RegionBindings |
| typedef const RegionBindingsRef & | RegionBindingsConstRef |
| typedef const LimitedRegionBindingsRef & | LimitedRegionBindingsConstRef |
| typedef SmallVector< const FieldDecl *, 8 > | FieldVector |
| Functions | |
|---|---|
| static raw_ostream & | llvm::operator<< (raw_ostream &Out, BindingKey K) |
| static bool | isUnionField (const FieldRegion *FR) |
| static void | getSymbolicOffsetFields (BindingKey K, FieldVector &Fields) |
| static bool | isCompatibleWithFields (BindingKey K, const FieldVector &Fields) |
| static void | collectSubRegionBindings (SmallVectorImpl< BindingPair > &Bindings, SValBuilder &SVB, const ClusterBindings &Cluster, const SubRegion *Top, BindingKey TopKey, bool IncludeAllDefaultBindings) |
| Collects all bindings in Cluster that may refer to bindings within Top. | |
| static void | collectSubRegionBindings (SmallVectorImpl< BindingPair > &Bindings, SValBuilder &SVB, const ClusterBindings &Cluster, const SubRegion *Top, bool IncludeAllDefaultBindings) |
| static QualType | getUnderlyingType (const SubRegion *R) |
| static std::optional< nonloc::LazyCompoundVal > | getExistingLazyBinding (SValBuilder &SVB, RegionBindingsConstRef B, const SubRegion *R, bool AllowSubregionBindings) |
| Checks to see if store B has a lazy binding for region R. | |
| static SmallVector< uint64_t, 2 > | getConstantArrayExtents (const ConstantArrayType *CAT) |
| This is a helper function for getConstantValFromConstArrayInitializer. | |
| static std::pair< SmallVector< SVal, 2 >, const MemRegion * > | getElementRegionOffsetsWithBase (const ElementRegion *ER) |
| This is a helper function for getConstantValFromConstArrayInitializer. | |
| static std::optional< SVal > | convertOffsetsFromSvalToUnsigneds (const SmallVector< SVal, 2 > &SrcOffsets, const SmallVector< uint64_t, 2 > ArrayExtents, SmallVector< uint64_t, 2 > &DstOffsets) |
| static std::optional< SVal > | getDerivedSymbolForBinding (RegionBindingsConstRef B, const TypedValueRegion *BaseRegion, const TypedValueRegion *SubReg, const ASTContext &Ctx, SValBuilder &SVB) |
◆ BindingPair
typedef std::pair<BindingKey, SVal> BindingPair
◆ ClusterBindings
typedef llvm::ImmutableMap<BindingKey, SVal> ClusterBindings
◆ ClusterBindingsRef
typedef llvm::ImmutableMapRef<BindingKey, SVal> ClusterBindingsRef
◆ FieldVector
◆ LimitedRegionBindingsConstRef
◆ RegionBindings
◆ RegionBindingsConstRef
typedef const RegionBindingsRef& RegionBindingsConstRef
◆ collectSubRegionBindings() [1/2]
◆ collectSubRegionBindings() [2/2]
◆ convertOffsetsFromSvalToUnsigneds()
◆ getConstantArrayExtents()
◆ getDerivedSymbolForBinding()
◆ getElementRegionOffsetsWithBase()
This is a helper function for getConstantValFromConstArrayInitializer.
Return an array of offsets from nested ElementRegions and a root base region. The array is never empty and a base region is never null.
E.g. for Element{Element{Element{VarRegion},1},2},3} returns { 3, 2, 1 }. This represents an access through indirection: arr[1][2][3];
Parameters
Note
The result array is in the reverse order of indirection expression: arr[1][2][3] -> { 3, 2, 1 }. This helps to provide complexity O(n), where n is a number of indirections. It may not affect performance in real-life code, though.
Examples
/work/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/StaticAnalyzer/Core/RegionStore.cpp.
Definition at line 1793 of file RegionStore.cpp.
References clang::ento::ElementRegion::getIndex(), and clang::ento::SubRegion::getSuperRegion().
◆ getExistingLazyBinding()
◆ getSymbolicOffsetFields()
| void getSymbolicOffsetFields ( BindingKey K, FieldVector & Fields ) | static |
|---|
◆ getUnderlyingType()
◆ isCompatibleWithFields()
| bool isCompatibleWithFields ( BindingKey K, const FieldVector & Fields ) | static |
|---|