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

            Bug ID: 20185
           Summary: The objc_designated_initializer attribute generates a
                    warning even if the init method can never return.
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 12732
  --> http://llvm.org/bugs/attachment.cgi?id=12732&action=edit
Source code demonstrating problem

Build the attached code.

I don't expect -[ColoredBox initWithSideLength:] to generate a warning/error
since the method can never return (the call has been rejected and should be
fixed at development-time.)

We use this idiom quite a but when a subclass shouldn't be initialized directly
with the superclass's designated initializer.

It would be great if clang allowed us to use the objc_designated_initializer
attribute without the extraneous warning.

% clang --version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to