Fix crash-on-invalid with inheriting constructor.

Fixes PR16656.

llvm-svn: 186631
This commit is contained in:
Eli Friedman 2013-07-18 23:59:50 +00:00
parent a20a403c1d
commit 7a2eca0f0f
2 changed files with 4 additions and 2 deletions

View File

@ -3422,7 +3422,7 @@ def err_redefinition : Error<"redefinition of %0">;
def err_definition_of_implicitly_declared_member : Error<
"definition of implicitly declared %select{default constructor|copy "
"constructor|move constructor|copy assignment operator|move assignment "
"operator|destructor}1">;
"operator|destructor|function}1">;
def err_definition_of_explicitly_defaulted_member : Error<
"definition of explicitly defaulted %select{default constructor|copy "
"constructor|move constructor|copy assignment operator|move assignment "

View File

@ -1,6 +1,5 @@
// RUN: %clang_cc1 -std=c++11 -verify %s
// expected-no-diagnostics
struct A {
constexpr A(const int&) : rval(false) {}
constexpr A(const int&&) : rval(true) {}
@ -28,3 +27,6 @@ struct D : C {
using C::C;
};
static_assert(D(123).v == 123, "");
// FIXME: This diagnostic sucks.
template<typename T> constexpr D::D(T t) : C(t) {} // expected-error {{definition of implicitly declared function}}