[LLVMbugs] [Bug 20185] New: The objc_designated_initializer attribute generates a warning even if the init method can never return.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jul 1 13:24:01 PDT 2014
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: unassignedclangbugs at nondot.org
Reporter: jim.correia at pobox.com
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140701/b42813ab/attachment.html>
More information about the llvm-bugs
mailing list