[LLVMbugs] [Bug 8970] New: -Wmissing-noreturn produces a false positive on some constructors
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jan 12 22:31:49 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=8970
Summary: -Wmissing-noreturn produces a false positive on some
constructors
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: oliver at apple.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Created an attachment (id=6004)
--> (http://llvm.org/bugs/attachment.cgi?id=6004)
Test case
If you compile the attched file:
struct Wiffle {
Wiffle(void* woffle)
: m_woffle(woffle)
{
}
private:
void* m_woffle;
};
with
clang++ -c -Wmissing-noreturn foo.cpp
You get an erroneous warning:
foo.cpp:4:9: warning: function could be attribute 'noreturn'
[-Wmissing-noreturn]
{
This of course breaks those projects using -Werror :D
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list