NoQ added a comment. Aha great, I see you've found that there's already an existing solution for this problem! I'm questioning this solution though, maybe a more general solution could have helped us avoid this problem altogether.
================ Comment at: clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp:313-315 + // Under ARC, blocks are retained and released automatically: + if (isArcManagedBlock(Referred, Ctx)) + return false; ---------------- Aha ok, it sounds like we can no longer be sure that the block is on the stack at this point, did I get it right? In this case I think it's more productive to have the block's memory space be `UnknownSpaceRegion` from the start, so that it fell through the memory space check, both here and at other call sites of `isArcManagedBlock()` (so it can be removed), and in any other code that relies on memory spaces (so this mistake is never made again). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131009/new/ https://reviews.llvm.org/D131009 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits