[analyzer] Fixing a bug raising false positives of stack block object
leaking in ARC mode When ARC (automatic reference count) is enabled, (objective-c) block objects are automatically retained and released thus they do not leak. Without ARC, they still can leak from an expiring stack frame like other stack variables. With this commit, the static analyzer now puts a block object in an "unknown" region if ARC is enabled because it is up to the implementation to choose whether to put the object on stack initially (then move to heap when needed) or in heap directly under ARC. Therefore, the `StackAddrEscapeChecker` has no need to know specifically about ARC at all and it will not report errors on objects in "unknown" regions. Reviewed By: NoQ (Artem Dergachev) Differential Revision: https://reviews.llvm.org/D131009
Loading
Please sign in to comment