================ @@ -1641,6 +1641,17 @@ def warn_implicitly_retains_self : Warning < "block implicitly retains 'self'; explicitly mention 'self' to indicate " "this is intended behavior">, InGroup<DiagGroup<"implicit-retain-self">>, DefaultIgnore; +def warn_blocks_capturing_this : Warning<"block implicitly captures 'this'">, + InGroup<DiagGroup<"blocks-capturing-this">>, + DefaultIgnore; +def warn_blocks_capturing_reference + : Warning<"block implicitly captures a C++ reference">, + InGroup<DiagGroup<"blocks-capturing-reference">>, + DefaultIgnore; +def warn_blocks_capturing_raw_pointer + : Warning<"block implicitly captures a raw pointer">, ---------------- sdefresne wrote:
Thank you. I'll work on writing an RFC. Regarding `__attribute__((noescape))`, my current patch already respect this and do not report captures from blocks marked with this attribute. https://github.com/llvm/llvm-project/pull/144388 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits