[LLVMbugs] [Bug 17356] New: static NSObject* is not unused in ARC code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Sep 25 01:19:08 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17356

            Bug ID: 17356
           Summary: static NSObject* is not unused in ARC code
           Product: clang
           Version: 3.3
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: peter at stairways.com.au
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Apple LLVM version 5.0 (clang-500.2.75) (based on LLVM 3.3svn)

Clang -Wunused-variable reports lines like this:

static NSObject* o = [NSObject new];
or
static dispatch_source_t timer = dispatch_source_create(
DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue );

as unused.  However, when using ARC, this static variable is not unused, it
serves the very real purpose of holding on to a reference to the object, and so
the warning is false.

-- 
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/20130925/ce21f894/attachment.html>


More information about the llvm-bugs mailing list