diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-03-23 03:33:32 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-03-23 03:33:32 +0000 |
commit | 1af83c444e5a2f6f50a6e1c15e6ebc618ae18a5f (patch) | |
tree | 8a325a6f98d042574b75774b359263f77a7d32e8 /include/clang/Basic | |
parent | ccc6f36e53274fccae024f30ac5adb6be6f815d3 (diff) |
Support for definitions of member enumerations of class templates outside the
class template's definition, and for explicit specializations of such enum
members.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153304 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r-- | include/clang/Basic/DiagnosticParseKinds.td | 2 | ||||
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 31 |
2 files changed, 17 insertions, 16 deletions
diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td index 1f03a0777c..c585f87c73 100644 --- a/include/clang/Basic/DiagnosticParseKinds.td +++ b/include/clang/Basic/DiagnosticParseKinds.td @@ -500,6 +500,8 @@ def err_explicit_instantiation_with_definition : Error< "definition is meant to be an explicit specialization, add '<>' after the " "'template' keyword">; def err_enum_template : Error<"enumeration cannot be a template">; +def err_explicit_instantiation_enum : Error< + "enumerations cannot be explicitly instantiated">; def err_missing_dependent_template_keyword : Error< "use 'template' keyword to treat '%0' as a dependent template name">; diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 2ce1e895dc..36232b1e98 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -2376,7 +2376,8 @@ def err_pointer_to_member_oper_value_classify: Error< // C++ template specialization def err_template_spec_unknown_kind : Error< "can only provide an explicit specialization for a class template, function " - "template, or a member function, static data member, or member class of a " + "template, or a member function, static data member, " + "%select{or member class|member class, or member enumeration}0 of a " "class template">; def note_specialized_entity : Note< "explicitly specialized declaration is here">; @@ -2388,30 +2389,30 @@ def err_template_spec_decl_friend : Error< "cannot declare an explicit specialization in a friend">; def err_template_spec_decl_out_of_scope_global : Error< "%select{class template|class template partial|function template|member " - "function|static data member|member class}0 specialization of %1 must " - "originally be declared in the global scope">; + "function|static data member|member class|member enumeration}0 " + "specialization of %1 must originally be declared in the global scope">; def err_template_spec_decl_out_of_scope : Error< "%select{class template|class template partial|function template|member " - "function|static data member|member class}0 specialization of %1 must " - "originally be declared in namespace %2">; + "function|static data member|member class|member enumeration}0 " + "specialization of %1 must originally be declared in namespace %2">; def ext_template_spec_decl_out_of_scope : ExtWarn< "first declaration of %select{class template|class template partial|" - "function template|member function|static data member|member class}0 " - "specialization of %1 outside namespace %2 is a C++11 extension">, - InGroup<CXX11>; + "function template|member function|static data member|member class|" + "member enumeration}0 specialization of %1 outside namespace %2 is a " + "C++11 extension">, InGroup<CXX11>; def warn_cxx98_compat_template_spec_decl_out_of_scope : Warning< "%select{class template|class template partial|function template|member " - "function|static data member|member class}0 specialization of %1 outside " - "namespace %2 is incompatible with C++98">, + "function|static data member|member class|member enumeration}0 " + "specialization of %1 outside namespace %2 is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore; def err_template_spec_redecl_out_of_scope : Error< "%select{class template|class template partial|function template|member " - "function|static data member|member class}0 specialization of %1 not in a " - "namespace enclosing %2">; + "function|static data member|member class|member enumeration}0 " + "specialization of %1 not in a namespace enclosing %2">; def err_template_spec_redecl_global_scope : Error< "%select{class template|class template partial|function template|member " - "function|static data member|member class}0 specialization of %1 must occur " - "at global scope">; + "function|static data member|member class|member enumeration}0 " + "specialization of %1 must occur at global scope">; def err_spec_member_not_instantiated : Error< "specialization of member %q0 does not specialize an instantiated member">; def note_specialized_decl : Note<"attempt to specialize declaration here">; @@ -2579,8 +2580,6 @@ def warn_cxx98_compat_explicit_instantiation_after_specialization : Warning< InGroup<CXX98CompatPedantic>, DefaultIgnore; def note_previous_template_specialization : Note< "previous template specialization is here">; -def err_explicit_instantiation_enum : Error< - "explicit instantiation of enumeration type %0">; def err_explicit_instantiation_nontemplate_type : Error< "explicit instantiation of non-templated type %0">; def note_nontemplate_decl_here : Note< |