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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to