Skip to content

Commit 8bf192d

Browse files
committed
Take references to SmallVectorImpl rather than SmallVector
1 parent a778a19 commit 8bf192d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,12 @@ void StackAddrEscapeChecker::checkPreCall(const CallEvent &Call,
250250
class FindStackRegionsSymbolVisitor final : public SymbolVisitor {
251251
CheckerContext &Ctxt;
252252
const StackFrameContext *StackFrameContext;
253-
SmallVector<const MemRegion *> &EscapingStackRegions;
253+
SmallVectorImpl<const MemRegion *> &EscapingStackRegions;
254254

255255
public:
256256
explicit FindStackRegionsSymbolVisitor(
257257
CheckerContext &Ctxt,
258-
SmallVector<const MemRegion *> &StorageForStackRegions)
258+
SmallVectorImpl<const MemRegion *> &StorageForStackRegions)
259259
: Ctxt(Ctxt), StackFrameContext(Ctxt.getStackFrame()),
260260
EscapingStackRegions(StorageForStackRegions) {}
261261

@@ -298,7 +298,7 @@ class FindStackRegionsSymbolVisitor final : public SymbolVisitor {
298298
/// 1. If returning a block data region that has stack memory space
299299
/// 2. If returning a constructed object that has stack memory space
300300
static SmallVector<const MemRegion *>
301-
FilterReturnExpressionLeaks(const SmallVector<const MemRegion *> &MaybeEscaped,
301+
FilterReturnExpressionLeaks(const SmallVectorImpl<const MemRegion *> &MaybeEscaped,
302302
CheckerContext &C, const Expr *RetE, SVal &RetVal) {
303303

304304
SmallVector<const MemRegion *> WillEscape;

0 commit comments

Comments
 (0)