[llvm-bugs] [Bug 35644] New: Incorrect warning generated for methods with noexcept signature and catch all handler
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Dec 12 08:25:40 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35644
Bug ID: 35644
Summary: Incorrect warning generated for methods with noexcept
signature and catch all handler
Product: clang
Version: 5.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: Michael.Craggs at ith-icoserve.com
CC: llvm-bugs at lists.llvm.org
Created attachment 19539
--> https://bugs.llvm.org/attachment.cgi?id=19539&action=edit
sample source file to compile demonstration
If the code below ( and attached 'main.c' ):
void f() noexcept
{
try {
throw;
}
catch (...) {
}
}
is compiled with clang 5.0.1RC3 the following warning is generated:
" 'f' has a non-throwing exception specification but can still throw
[-Wexceptions]"
which is incorrect since the throw call is caught by the catch-all handler,
therefore qualifying as non-throwing.
g++, 4.8.2 at least, does not emit any warning.
Kind regards
--
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/20171212/17321b3a/attachment.html>
More information about the llvm-bugs
mailing list