@@ -264,7 +264,7 @@ class NoStoreFuncVisitor final : public BugReporterVisitor {
264
264
BugReport &BR) override {
265
265
266
266
const LocationContext *Ctx = N->getLocationContext ();
267
- const StackFrameContext *SCtx = Ctx->getCurrentStackFrame ();
267
+ const StackFrameContext *SCtx = Ctx->getStackFrame ();
268
268
ProgramStateRef State = N->getState ();
269
269
auto CallExitLoc = N->getLocationAs <CallExitBegin>();
270
270
@@ -319,7 +319,7 @@ class NoStoreFuncVisitor final : public BugReporterVisitor {
319
319
// / The calculation is cached in FramesModifyingRegion.
320
320
bool isRegionOfInterestModifiedInFrame (const ExplodedNode *N) {
321
321
const LocationContext *Ctx = N->getLocationContext ();
322
- const StackFrameContext *SCtx = Ctx->getCurrentStackFrame ();
322
+ const StackFrameContext *SCtx = Ctx->getStackFrame ();
323
323
if (!FramesModifyingCalculated.count (SCtx))
324
324
findModifyingFrames (N);
325
325
return FramesModifyingRegion.count (SCtx);
@@ -333,7 +333,7 @@ class NoStoreFuncVisitor final : public BugReporterVisitor {
333
333
ProgramStateRef LastReturnState = N->getState ();
334
334
SVal ValueAtReturn = LastReturnState->getSVal (RegionOfInterest);
335
335
const LocationContext *Ctx = N->getLocationContext ();
336
- const StackFrameContext *OriginalSCtx = Ctx->getCurrentStackFrame ();
336
+ const StackFrameContext *OriginalSCtx = Ctx->getStackFrame ();
337
337
338
338
do {
339
339
ProgramStateRef State = N->getState ();
@@ -344,16 +344,15 @@ class NoStoreFuncVisitor final : public BugReporterVisitor {
344
344
}
345
345
346
346
FramesModifyingCalculated.insert (
347
- N->getLocationContext ()->getCurrentStackFrame ());
347
+ N->getLocationContext ()->getStackFrame ());
348
348
349
349
if (wasRegionOfInterestModifiedAt (N, LastReturnState, ValueAtReturn)) {
350
- const StackFrameContext *SCtx =
351
- N->getLocationContext ()->getCurrentStackFrame ();
350
+ const StackFrameContext *SCtx = N->getStackFrame ();
352
351
while (!SCtx->inTopFrame ()) {
353
352
auto p = FramesModifyingRegion.insert (SCtx);
354
353
if (!p.second )
355
354
break ; // Frame and all its parents already inserted.
356
- SCtx = SCtx->getParent ()->getCurrentStackFrame ();
355
+ SCtx = SCtx->getParent ()->getStackFrame ();
357
356
}
358
357
}
359
358
@@ -913,7 +912,7 @@ static bool isInitializationOfVar(const ExplodedNode *N, const VarRegion *VR) {
913
912
914
913
assert (VR->getDecl ()->hasLocalStorage ());
915
914
const LocationContext *LCtx = N->getLocationContext ();
916
- return FrameSpace->getStackFrame () == LCtx->getCurrentStackFrame ();
915
+ return FrameSpace->getStackFrame () == LCtx->getStackFrame ();
917
916
}
918
917
919
918
// / Show diagnostics for initializing or declaring a region \p R with a bad value.
@@ -2310,7 +2309,7 @@ CXXSelfAssignmentBRVisitor::VisitNode(const ExplodedNode *Succ,
2310
2309
const auto Param =
2311
2310
State->getSVal (State->getRegion (Met->getParamDecl (0 ), LCtx));
2312
2311
const auto This =
2313
- State->getSVal (SVB.getCXXThis (Met, LCtx->getCurrentStackFrame ()));
2312
+ State->getSVal (SVB.getCXXThis (Met, LCtx->getStackFrame ()));
2314
2313
2315
2314
auto L = PathDiagnosticLocation::create (Met, BRC.getSourceManager ());
2316
2315
0 commit comments