Skip to content

Commit 3d1d1b2

Browse files
Simplify BindDefaultInitial
1 parent e944429 commit 3d1d1b2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

clang/lib/StaticAnalyzer/Core/RegionStore.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -607,17 +607,14 @@ class RegionStoreManager : public StoreManager {
607607
// a default value.
608608
BindResult BindDefaultInitial(Store store, const MemRegion *R,
609609
SVal V) override {
610-
llvm::SmallVector<SVal, 0> EscapedValuesDuringBind;
611-
BoundedRegionBindingsRef B =
612-
getRegionBindings(store, EscapedValuesDuringBind);
610+
RegionBindingsRef B = getRegionBindings(store);
613611
// Use other APIs when you have to wipe the region that was initialized
614612
// earlier.
615613
assert(!(B.getDefaultBinding(R) || B.getDirectBinding(R)) &&
616614
"Double initialization!");
617615
B = B.addBinding(BindingKey::Make(R, BindingKey::Default), V);
618616
return BindResult{
619-
StoreRef(B.asImmutableMap().getRootWithoutRetain(), *this),
620-
std::move(EscapedValuesDuringBind)};
617+
StoreRef(B.asImmutableMap().getRootWithoutRetain(), *this), {}};
621618
}
622619

623620
// BindDefaultZero is used for zeroing constructors that may accidentally

0 commit comments

Comments
 (0)