Home
last modified time | relevance | path

Searched refs:MemRegion (Results 1 – 25 of 66) sorted by relevance

123

/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/
DMemRegion.h47 const MemRegion *R;
58 RegionOffset(const MemRegion *r, int64_t off) : R(r), Offset(off) {} in RegionOffset()
60 const MemRegion *getRegion() const { return R; } in getRegion()
77 class MemRegion : public llvm::FoldingSetNode {
127 MemRegion(Kind k) : kind(k) {} in MemRegion() function
128 virtual ~MemRegion();
139 const MemRegion *getBaseRegion() const;
142 virtual bool isSubRegionOf(const MemRegion *R) const;
144 const MemRegion *StripCasts(bool StripBaseCasts = true) const;
193 class MemSpaceRegion : public MemRegion {
[all …]
DStore.h72 virtual StoreRef BindDefault(Store store, const MemRegion *R, SVal V);
107 const MemRegion *region, in getSizeInElements()
137 const ElementRegion *GetElementZeroRegion(const MemRegion *R, QualType T);
142 const MemRegion *castRegion(const MemRegion *region, QualType CastToTy);
148 const MemRegion *region) const = 0;
159 typedef SmallVector<const MemRegion *, 8> InvalidatedRegions;
203 virtual bool scanReachableSymbols(Store S, const MemRegion *R,
213 const MemRegion *region, SVal val) = 0;
219 const MemRegion* Binding;
226 bool HandleBinding(StoreManager& SMgr, Store store, const MemRegion* R,
[all …]
DDynamicTypeMap.h27 typedef llvm::ImmutableMap<const MemRegion *, DynamicTypeInfo>
40 const MemRegion *Reg);
43 ProgramStateRef setDynamicTypeInfo(ProgramStateRef State, const MemRegion *Reg,
48 const MemRegion *Reg, QualType NewTy,
DSubEngine.h41 class MemRegion; variable
127 ArrayRef<const MemRegion *> ExplicitRegions,
128 ArrayRef<const MemRegion *> Regions,
134 const MemRegion* MR) { in processRegionChange()
144 ArrayRef<const MemRegion *> ExplicitRegions,
145 ArrayRef<const MemRegion *> Regions,
DSymbolManager.h35 class MemRegion; variable
268 const MemRegion* R;
274 SymbolMetadata(SymbolID sym, const MemRegion* r, const Stmt *s, QualType t, in SymbolMetadata()
278 const MemRegion *getRegion() const { return R; } in getRegion()
287 static void Profile(llvm::FoldingSetNodeID& profile, const MemRegion *R, in Profile()
519 const SymbolMetadata *getMetadataSymbol(const MemRegion *R, const Stmt *S,
565 typedef llvm::DenseSet<const MemRegion *> RegionSetTy;
577 llvm::DenseMap<const MemRegion *, unsigned> includedRegionCache;
595 bool isLiveRegion(const MemRegion *region);
641 void markLive(const MemRegion *region);
[all …]
DProgramState.h260 invalidateRegions(ArrayRef<const MemRegion *> Regions, const Expr *E,
310 SVal getSVal(const MemRegion* R) const;
312 SVal getSValAsScalarOrLoc(const MemRegion *R) const;
330 bool scanReachableSymbols(const MemRegion * const *I,
331 const MemRegion * const *E,
339 scanReachableSymbols(const MemRegion * const *beg,
340 const MemRegion * const *end) const;
351 ProgramStateRef addTaint(const MemRegion *R,
359 bool isTainted(const MemRegion *Reg, TaintTagType Kind=TaintTagGeneric) const;
750 inline SVal ProgramState::getSVal(const MemRegion* R) const { in getSVal()
[all …]
DExprEngine.h290 ArrayRef<const MemRegion *> ExplicitRegions,
291 ArrayRef<const MemRegion *> Regions,
438 void VisitCXXDestructor(QualType ObjectType, const MemRegion *Dest,
508 ArrayRef<const MemRegion *> ExplicitRegions,
509 ArrayRef<const MemRegion *> Regions,
586 void BifurcateCall(const MemRegion *BifurReg,
627 const MemRegion *getRegionForConstructedObject(const CXXConstructExpr *CE,
DSVals.h35 class MemRegion; variable
172 const MemRegion *getAsRegion() const;
493 explicit MemRegionVal(const MemRegion* r) : Loc(MemRegionKind, r) {} in MemRegionVal()
496 const MemRegion* getRegion() const { in getRegion()
497 return static_cast<const MemRegion*>(Data); in getRegion()
501 const MemRegion* stripCasts(bool StripBaseCasts = true) const;
/external/clang/lib/StaticAnalyzer/Core/
DStore.cpp45 const MemRegion *StoreManager::MakeElementRegion(const MemRegion *Base, in MakeElementRegion()
51 StoreRef StoreManager::BindDefault(Store store, const MemRegion *R, SVal V) { in BindDefault()
55 const ElementRegion *StoreManager::GetElementZeroRegion(const MemRegion *R, in GetElementZeroRegion()
62 const MemRegion *StoreManager::castRegion(const MemRegion *R, QualType CastToTy) { in castRegion()
102 case MemRegion::CXXThisRegionKind: in castRegion()
103 case MemRegion::GenericMemSpaceRegionKind: in castRegion()
104 case MemRegion::StackLocalsSpaceRegionKind: in castRegion()
105 case MemRegion::StackArgumentsSpaceRegionKind: in castRegion()
106 case MemRegion::HeapSpaceRegionKind: in castRegion()
107 case MemRegion::UnknownSpaceRegionKind: in castRegion()
[all …]
DMemRegion.cpp59 const MemRegion *superRegion) { in getSubRegion()
98 const MemRegion *superRegion) { in getSubRegion()
117 const MemRegion *superRegion) { in getSubRegion()
138 MemRegion::~MemRegion() {} in ~MemRegion()
149 bool SubRegion::isSubRegionOf(const MemRegion* R) const { in isSubRegionOf()
150 const MemRegion* r = getSuperRegion(); in isSubRegionOf()
165 const MemRegion *superRegion = r->getSuperRegion(); in getMemRegionManager()
229 ObjCIvarRegion::ObjCIvarRegion(const ObjCIvarDecl *ivd, const MemRegion* sReg) in ObjCIvarRegion()
264 const MemRegion* superRegion) { in ProfileRegion()
272 const MemRegion* superRegion) { in ProfileRegion()
[all …]
DRegionStore.cpp47 llvm::PointerIntPair<const MemRegion *, 2> P;
59 explicit BindingKey(const MemRegion *r, uint64_t offset, Kind k) in BindingKey()
70 const MemRegion *getRegion() const { return P.getPointer(); } in getRegion()
81 const MemRegion *getBaseRegion() const { in getBaseRegion()
92 static BindingKey Make(const MemRegion *R, Kind k);
111 BindingKey BindingKey::Make(const MemRegion *R, Kind k) { in Make()
146 typedef llvm::ImmutableMap<const MemRegion *, ClusterBindings>
150 class RegionBindingsRef : public llvm::ImmutableMapRef<const MemRegion *,
155 typedef llvm::ImmutableMapRef<const MemRegion *, ClusterBindings>
161 : llvm::ImmutableMapRef<const MemRegion *, ClusterBindings>(T, F), in RegionBindingsRef()
[all …]
DSVals.cpp40 const MemRegion *R = RV->getRegion(); in hasConjuredSymbol()
53 const MemRegion* R = X->getRegion(); in getAsFunctionDecl()
75 const MemRegion *R = X->getRegion(); in getAsLocSymbol()
91 const MemRegion *R = X->getRegion(); in getLocSymbolInBase()
135 const MemRegion *SVal::getAsRegion() const { in getAsRegion()
145 const MemRegion *loc::MemRegionVal::stripCasts(bool StripBaseCasts) const { in stripCasts()
146 const MemRegion *R = getRegion(); in stripCasts()
DProgramState.cpp118 const MemRegion *MR = LV.getAsRegion(); in bindLoc()
127 const MemRegion *R = loc.castAs<loc::MemRegionVal>().getRegion(); in bindDefault()
135 typedef ArrayRef<const MemRegion *> RegionList;
235 SVal ProgramState::getSValAsScalarOrLoc(const MemRegion *R) const { in getSValAsScalarOrLoc()
517 const MemRegion *R = val.getRegion()->getBaseRegion(); in scan()
582 bool ScanReachableSymbols::scan(const MemRegion *R) { in scan()
600 const MemRegion *Super = SR->getSuperRegion(); in scan()
640 bool ProgramState::scanReachableSymbols(const MemRegion * const *I, in scanReachableSymbols()
641 const MemRegion * const *E, in scanReachableSymbols()
661 const MemRegion *R = getSVal(S, LCtx).getAsRegion(); in addTaint()
[all …]
DDynamicTypeMap.cpp22 const MemRegion *Reg) { in getDynamicTypeInfo()
42 ProgramStateRef setDynamicTypeInfo(ProgramStateRef State, const MemRegion *Reg, in setDynamicTypeInfo()
/external/clang/lib/StaticAnalyzer/Checkers/
DStackAddrEscapeChecker.cpp38 void EmitStackError(CheckerContext &C, const MemRegion *R,
40 static SourceRange genName(raw_ostream &os, const MemRegion *R,
45 SourceRange StackAddrEscapeChecker::genName(raw_ostream &os, const MemRegion *R, in genName()
95 void StackAddrEscapeChecker::EmitStackError(CheckerContext &C, const MemRegion *R, in EmitStackError()
129 const MemRegion *R = V.getAsRegion(); in checkPreStmt()
181 SmallVector<std::pair<const MemRegion*, const MemRegion*>, 10> V; in checkEndFunction()
189 const MemRegion *region, SVal val) override { in checkEndFunction()
194 const MemRegion *vR = val.getAsRegion(); in checkEndFunction()
DPointerSubChecker.cpp47 const MemRegion *LR = LV.getAsRegion(); in checkPreStmt()
48 const MemRegion *RR = RV.getAsRegion(); in checkPreStmt()
53 const MemRegion *BaseLR = LR->getBaseRegion(); in checkPreStmt()
54 const MemRegion *BaseRR = RR->getBaseRegion(); in checkPreStmt()
DCStringChecker.cpp71 ArrayRef<const MemRegion *> ExplicitRegions,
72 ArrayRef<const MemRegion *> Regions,
127 const MemRegion *MR,
132 const MemRegion *MR,
152 const MemRegion *MR);
209 REGISTER_MAP_WITH_PROGRAMSTATE(CStringLength, const MemRegion *, SVal) in REGISTER_MAP_WITH_PROGRAMSTATE() argument
280 const MemRegion *R = l.getAsRegion(); in CheckLocation()
629 const MemRegion *MR, in setCStringLength()
636 case MemRegion::StringRegionKind: in setCStringLength()
641 case MemRegion::SymbolicRegionKind: in setCStringLength()
[all …]
DVforkChecker.cpp169 const MemRegion *LhsDeclReg = in checkPostCall()
172 : (const MemRegion *)VFORK_RESULT_NONE; in checkPostCall()
198 const MemRegion *VforkLhs = in checkBind()
199 static_cast<const MemRegion *>(State->get<VforkResultRegion>()); in checkBind()
200 const MemRegion *MR = L.getAsRegion(); in checkBind()
DPthreadLockChecker.cpp77 REGISTER_LIST_WITH_PROGRAMSTATE(LockSet, const MemRegion *) in REGISTER_LIST_WITH_PROGRAMSTATE() argument
79 REGISTER_MAP_WITH_PROGRAMSTATE(LockMap, const MemRegion *, LockState) in REGISTER_LIST_WITH_PROGRAMSTATE()
128 const MemRegion *lockR = lock.getAsRegion(); in AcquireLock()
196 const MemRegion *lockR = lock.getAsRegion(); in ReleaseLock()
226 const MemRegion *firstLockR = LS.getHead(); in ReleaseLock()
251 const MemRegion *LockR = Lock.getAsRegion(); in DestroyLock()
286 const MemRegion *LockR = Lock.getAsRegion(); in InitLock()
DDynamicTypeChecker.cpp44 DynamicTypeBugVisitor(const MemRegion *Reg) : Reg(Reg) {} in DynamicTypeBugVisitor()
59 const MemRegion *Reg;
63 const MemRegion *Reg, const Stmt *ReportedNode,
73 const MemRegion *Reg, in reportTypeError()
169 const MemRegion *Region = C.getSVal(CE).getAsRegion(); in checkPostStmt()
DNullabilityChecker.cpp149 NullabilityBugVisitor(const MemRegion *M) : Region(M) {} in NullabilityBugVisitor()
164 const MemRegion *Region;
173 const MemRegion *Region, CheckerContext &C,
177 void reportBug(ErrorKind Error, ExplodedNode *N, const MemRegion *Region, in reportBug()
237 REGISTER_MAP_WITH_PROGRAMSTATE(NullabilityMap, const MemRegion *,
268 const MemRegion *Region = RegionSVal->getRegion(); in getTrackRegion()
392 ErrorKind Error, ExplodedNode *N, const MemRegion *Region, in reportBugIfPreconditionHolds()
439 const MemRegion *Region = in checkEvent()
510 const MemRegion *Region = getTrackRegion(*RetSVal); in checkPreStmt()
582 const MemRegion *Region = getTrackRegion(*ArgSVal); in checkPreCall()
[all …]
DArrayBoundCheckerV2.cpp69 const MemRegion *region) { in computeExtentBegin()
74 case MemRegion::SymbolicRegionKind: in computeExtentBegin()
78 case MemRegion::ElementRegionKind: in computeExtentBegin()
260 const MemRegion *region = location.getAsRegion(); in computeOffset()
273 case MemRegion::ElementRegionKind: { in computeOffset()
DDynamicTypePropagation.cpp143 static void recordFixedType(const MemRegion *Region, const CXXMethodDecl *MD, in recordFixedType()
175 if (const MemRegion *Target = Ctor->getCXXThisVal().getAsRegion()) in checkPreCall()
188 const MemRegion *Target = Dtor->getCXXThisVal().getAsRegion(); in checkPreCall()
207 const MemRegion *RetReg = Call.getReturnValue().getAsRegion(); in checkPostCall()
237 const MemRegion *RecReg = Msg->getReceiverSVal().getAsRegion(); in checkPostCall()
262 if (const MemRegion *Target = Ctor->getCXXThisVal().getAsRegion()) { in checkPostCall()
280 const MemRegion *ToR = C.getSVal(CE).getAsRegion(); in dynamicTypePropagationOnCasts()
300 const MemRegion *MR = C.getSVal(NewE).getAsRegion(); in checkPostStmt()
348 const MemRegion *ToR = C.getSVal(CastE).getAsRegion(); in getBetterObjCType()
820 const MemRegion *RetRegion = M.getReturnValue().getAsRegion(); in checkPostObjCMessage()
DCheckerDocumentation.cpp262 ArrayRef<const MemRegion *> ExplicitRegions, in checkRegionChanges()
263 ArrayRef<const MemRegion *> Regions, in checkRegionChanges()
/external/clang/include/clang/StaticAnalyzer/Core/BugReporter/
DBugReporterVisitor.h28 class MemRegion; variable
100 const MemRegion *R;
114 FindLastStoreBRVisitor(KnownSVal V, const MemRegion *R, in FindLastStoreBRVisitor()
285 const MemRegion *R;
288 UndefOrNullArgVisitor(const MemRegion *InR) : R(InR) {} in UndefOrNullArgVisitor()

123