[llvm-bugs] [Bug 34804] New: -Wexceptions warns about caught exception in noexcept function

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 2 09:18:00 PDT 2017


            Bug ID: 34804
           Summary: -Wexceptions warns about caught exception in noexcept
           Product: clang
           Version: 5.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: redbeard0531 at gmail.com
                CC: llvm-bugs at 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]
test.cpp:1:6: note: function declared non-throwing here
void boom() noexcept {
     ^      ~~~~~~~~
1 warning generated.

> cat test.cpp
void boom() noexcept {
    try {
    } catch (...) {

This is a reduced repro from the following real-world code:

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/20171002/17c1eb9a/attachment.html>

More information about the llvm-bugs mailing list