We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6db96c9 commit d2616ccCopy full SHA for d2616cc
clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
@@ -203,8 +203,8 @@ void StackAddrEscapeChecker::checkAsyncExecutedBlockCaptures(
203
// a variable of the type "dispatch_semaphore_t".
204
if (isSemaphoreCaptured(*B.getDecl()))
205
return;
206
- for (const MemRegion *Region :
207
- llvm::make_first_range(getCapturedStackRegions(B, C))) {
+ auto Regions = getCapturedStackRegions(B, C);
+ for (const MemRegion *Region : llvm::make_first_range(Regions)) {
208
// The block passed to dispatch_async may capture another block
209
// created on the stack. However, there is no leak in this situaton,
210
// no matter if ARC or no ARC is enabled:
0 commit comments