ahatanak added a comment.
The lifetime of an object won't be extended in the following case since the
variable isn't captured by a block:
void foo(id);
void test(id a) {
__block id t = a;
foo(a);
t = 0;
}
clang should probably warn if a variable marked `__block` isn't captured by a
block, but I don't think `-Wunused-but-set-variable` should catch that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112850/new/
https://reviews.llvm.org/D112850
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits