[PATCH] D120372: [clang] 'unused-but-set-variable' warning should not apply to __attribute__((objc_precise_lifetime) Objective-C pointers
    Dave MacLachlan via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Tue Feb 22 17:48:04 PST 2022
    
    
  
dmaclach accepted this revision.
dmaclach added inline comments.
================
Comment at: clang/test/SemaObjC/objc-precise-lifetime-unused-variable.m:7
+  // no diagnostics for objects with precise lifetime semantics.
+  __attribute__((objc_precise_lifetime)) id x;
+  x = getFoo();
----------------
what happens in the case that x is never assigned to anything? Do we still get a warning?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120372/new/
https://reviews.llvm.org/D120372
    
    
More information about the cfe-commits
mailing list