diff options
-rw-r--r-- | clang/include/clang/Basic/DiagnosticSemaKinds.td | 2 | ||||
-rw-r--r-- | clang/test/SemaCXX/cxx0x-defaulted-functions.cpp | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index eb8bf915e85..cd032b4a87b 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -4357,7 +4357,7 @@ def err_definition_of_implicitly_declared_member : Error< def err_definition_of_explicitly_defaulted_member : Error< "definition of explicitly defaulted %select{default constructor|copy " "constructor|move constructor|copy assignment operator|move assignment " - "operator|destructor}0">; + "operator|destructor|function}0">; def err_redefinition_extern_inline : Error< "redefinition of a 'extern inline' function %0 is not supported in " "%select{C99 mode|C++}1">; diff --git a/clang/test/SemaCXX/cxx0x-defaulted-functions.cpp b/clang/test/SemaCXX/cxx0x-defaulted-functions.cpp index 08d5dbd285d..7ec9726095c 100644 --- a/clang/test/SemaCXX/cxx0x-defaulted-functions.cpp +++ b/clang/test/SemaCXX/cxx0x-defaulted-functions.cpp @@ -234,4 +234,12 @@ template<bool B> struct X { X<true> x1; X<false> x2; // expected-note {{in instantiation}} +template <typename Type> +class E { + explicit E(const int &) = default; +}; + +template <typename Type> +E<Type>::E(const int&) {} // expected-error {{definition of explicitly defaulted function}} + } |