https://bugs.llvm.org/show_bug.cgi?id=34804
Bug ID: 34804
Summary: -Wexceptions warns about caught exception in noexcept
function
Product: clang
Version: 5.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: redbeard0...@gmail.com
CC: llvm-bugs@lists.llvm.org
> clang++ -Wexceptions -c test.cpp -std=c++14
test.cpp:3:9: warning: 'boom' has a non-throwing exception specification but
can still throw [-Wexceptions]
throw;
^
test.cpp:1:6: note: function declared non-throwing here
void boom() noexcept {
^ ~~~~~~~~
1 warning generated.
> cat test.cpp
void boom() noexcept {
try {
throw;
} catch (...) {
}
}
This is a reduced repro from the following real-world code:
https://github.com/mongodb/mongo/blob/r3.5.13/src/mongo/util/assert_util.cpp#L247-L267
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs