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: unassignedclangb...@nondot.org Reporter: richard-l...@metafoo.co.uk CC: dgre...@apple.com, llvm-bugs@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.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs