diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index bdcccac34c34..7bbd25b9342e 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -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 " diff --git a/clang/test/CXX/special/class.inhctor/p8.cpp b/clang/test/CXX/special/class.inhctor/p8.cpp index 0c857382e38c..effc2c3bca24 100644 --- a/clang/test/CXX/special/class.inhctor/p8.cpp +++ b/clang/test/CXX/special/class.inhctor/p8.cpp @@ -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 constexpr D::D(T t) : C(t) {} // expected-error {{definition of implicitly declared function}}