[llvm-bugs] [Bug 31781] -Wunused-const-variable doesn't warn for ObjC types if ARC is enabled

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jan 30 14:42:50 PST 2017


https://llvm.org/bugs/show_bug.cgi?id=31781

Saleem Abdulrasool <compnerd at compnerd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dgregor at apple.com,
                   |                            |rjmccall at apple.com
         Resolution|---                         |INVALID

--- Comment #1 from Saleem Abdulrasool <compnerd at compnerd.org> ---
Doug and John can correct me if I am wrong, but I believe that the current
behavior is correct.

The lifetime is being extended here.  The type can have a dealloc method that
performs some operation with unknown side-effects.  By eliminating the type, we
have changed the semantics of the program.  Since this can occur by other means
at load time, we cannot actually determine if the type is actually unused.  So,
we would give a false warning here.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170130/c9cf66af/attachment.html>


More information about the llvm-bugs mailing list