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

            Bug ID: 45161
           Summary: Please add a warning for potentially throwing code in
                    noexcept function
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: raf...@espindo.la
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

Clang warns for

void foo() noexcept {
    throw 42;
}

But even -Weverything will not produce a warning for

static void bar() {
    throw 42;
}
void foo() noexcept {
    bar();
}

It would be quite convenient to have such a warning to help make a codebase
"noexcept correct". Having an extra warning for "could have been marked
noexcept" would also be useful.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to