[llvm-bugs] [Bug 45161] New: Please add a warning for potentially throwing code in noexcept function
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Mar 9 17:37:59 PDT 2020
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: unassignedclangbugs at nondot.org
Reporter: rafael at espindo.la
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200310/a000d9a9/attachment-0001.html>
More information about the llvm-bugs
mailing list