[all-commits] [llvm/llvm-project] a00944: [clang] 'unused-but-set-variable' warning should n...

Alex Lorenz via All-commits all-commits at lists.llvm.org
Fri Nov 5 07:48:33 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a00944ebeab1b0adbce606cde4d2410fcbb3f440
      https://github.com/llvm/llvm-project/commit/a00944ebeab1b0adbce606cde4d2410fcbb3f440
  Author: Alex Lorenz <arphaman at gmail.com>
  Date:   2021-11-05 (Fri, 05 Nov 2021)

  Changed paths:
    M clang/lib/Sema/SemaDecl.cpp
    A clang/test/SemaObjC/block-capture-unused-variable.m

  Log Message:
  -----------
  [clang] 'unused-but-set-variable' warning should not apply to __block objective-c pointers

The __block Objective-C pointers can be set but not used due to a commonly used lifetime extension pattern in Objective-C.

Differential Revision: https://reviews.llvm.org/D112850




More information about the All-commits mailing list