]> granicus.if.org Git - clang/commitdiff
Fix crash-on-invalid with inheriting constructor.
authorEli Friedman <eli.friedman@gmail.com>
Thu, 18 Jul 2013 23:59:50 +0000 (23:59 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Thu, 18 Jul 2013 23:59:50 +0000 (23:59 +0000)
Fixes PR16656.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186631 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
test/CXX/special/class.inhctor/p8.cpp

index bdcccac34c349e657968a5dbd89c3e119ebd65e9..7bbd25b9342e7912e1ca6268e69337849aac6eb9 100644 (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 "
index 0c857382e38c5b1725df0fd9e66b6032cdde6a81..effc2c3bca24a3e9da2da2251d64065d9c98918c 100644 (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}}