[llvm-bugs] [Bug 31487] New: new warning: warn when returning void expression

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Dec 28 06:17:32 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=31487

            Bug ID: 31487
           Summary: new warning: warn when returning void expression
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: llvm at bobbyperu.info
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

This warning would catch bugs such as:

void doSomething()

void func()
{
    if (condition)
        return     // Oops, forgot ; so doSomething() will be called


     doSomething();
}

-- 
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/20161228/40c4c126/attachment.html>


More information about the llvm-bugs mailing list