[llvm-bugs] [Bug 26536] New: missing diagnostic for mismatched exception specification on defaulted special member if a class definition sneaks into a default member initializer
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Feb 8 17:49:20 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26536
Bug ID: 26536
Summary: missing diagnostic for mismatched exception
specification on defaulted special member if a class
definition sneaks into a default member initializer
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: richard-llvm at metafoo.co.uk
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
Clang accepts this:
struct X {
X() noexcept = default;
int x = true ? (throw 0, 0) : [] { struct Y {}; return 0; }();
};
static_assert(!noexcept(X()));
This should be ill-formed: the default constructor of X cannot be defaulted as
'noexcept' because the implicit default constructor would not be 'noexcept'.
But we only have a single list of delayed exception specification checks, and
we perform those checks at the end of the definition of 'struct Y' by mistake,
before we can see that the default member initializer for 'x' might throw.
--
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/20160209/ec494854/attachment.html>
More information about the llvm-bugs
mailing list