[clang] 7994e51 - Revert "Revert "[clang-tblgen][NFC] renames Diagnostic.Text to Diagnostic.Summary""

Christopher Di Bella via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 20 20:56:22 PST 2022


Author: Christopher Di Bella
Date: 2022-11-21T04:55:19Z
New Revision: 7994e5144aa52530fca9af0d81ca7134368034fe

URL: https://github.com/llvm/llvm-project/commit/7994e5144aa52530fca9af0d81ca7134368034fe
DIFF: https://github.com/llvm/llvm-project/commit/7994e5144aa52530fca9af0d81ca7134368034fe.diff

LOG: Revert "Revert "[clang-tblgen][NFC] renames Diagnostic.Text to Diagnostic.Summary""

This reverts commit 196edb9f3f4a036371af0013a3d8b857fe0924d5.

Added: 
    

Modified: 
    clang/include/clang/Basic/Diagnostic.td
    clang/include/clang/Basic/DiagnosticCommonKinds.td
    clang/include/clang/Basic/DiagnosticFrontendKinds.td
    clang/include/clang/Basic/DiagnosticLexKinds.td
    clang/include/clang/Basic/DiagnosticSemaKinds.td
    clang/test/TableGen/DiagnosticBase.inc
    clang/utils/TableGen/ClangDiagnosticsEmitter.cpp

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/Diagnostic.td b/clang/include/clang/Basic/Diagnostic.td
index c932c90572786..21de05b707a58 100644
--- a/clang/include/clang/Basic/Diagnostic.td
+++ b/clang/include/clang/Basic/Diagnostic.td
@@ -75,10 +75,10 @@ include "DiagnosticGroups.td"
 
 
 // All diagnostics emitted by the compiler are an indirect subclass of this.
-class Diagnostic<string text, DiagClass DC, Severity defaultmapping> {
+class Diagnostic<string summary, DiagClass DC, Severity defaultmapping> {
   /// Component is specified by the file with a big let directive.
   string         Component = ?;
-  string         Text = text;
+  string         Summary = summary;
   DiagClass      Class = DC;
   SFINAEResponse SFINAE = SFINAE_Suppress;
   bit            AccessControl = 0;

diff  --git a/clang/include/clang/Basic/DiagnosticCommonKinds.td b/clang/include/clang/Basic/DiagnosticCommonKinds.td
index c8a1bae487d8c..c59adcc72a68b 100644
--- a/clang/include/clang/Basic/DiagnosticCommonKinds.td
+++ b/clang/include/clang/Basic/DiagnosticCommonKinds.td
@@ -269,7 +269,7 @@ def note_constexpr_invalid_template_arg : Note<
   "%select{type_info object|string literal|temporary object|"
   "predefined '%3' variable}2 is not allowed in a template argument">;
 def err_constexpr_invalid_template_arg : Error<
-  note_constexpr_invalid_template_arg.Text>;
+  note_constexpr_invalid_template_arg.Summary>;
 
 // Sema && Frontend
 let CategoryName = "Inline Assembly Issue" in {

diff  --git a/clang/include/clang/Basic/DiagnosticFrontendKinds.td b/clang/include/clang/Basic/DiagnosticFrontendKinds.td
index 6ac8537c74f34..26083e3fc8d88 100644
--- a/clang/include/clang/Basic/DiagnosticFrontendKinds.td
+++ b/clang/include/clang/Basic/DiagnosticFrontendKinds.td
@@ -276,7 +276,7 @@ def warn_avx_calling_convention
     : Warning<"AVX vector %select{return|argument}0 of type %1 without '%2' "
               "enabled changes the ABI">,
       InGroup<DiagGroup<"psabi">>;
-def err_avx_calling_convention : Error<warn_avx_calling_convention.Text>;
+def err_avx_calling_convention : Error<warn_avx_calling_convention.Summary>;
 
 def err_alias_to_undefined : Error<
   "%select{alias|ifunc}0 must point to a defined "

diff  --git a/clang/include/clang/Basic/DiagnosticLexKinds.td b/clang/include/clang/Basic/DiagnosticLexKinds.td
index 908f4489d9a31..75a133d619d4d 100644
--- a/clang/include/clang/Basic/DiagnosticLexKinds.td
+++ b/clang/include/clang/Basic/DiagnosticLexKinds.td
@@ -461,7 +461,7 @@ def ext_pp_gnu_line_directive : Extension<
 def err_pp_invalid_directive : Error<
   "invalid preprocessing directive%select{|, did you mean '#%1'?}0">;
 def warn_pp_invalid_directive : Warning<
-  err_pp_invalid_directive.Text>, InGroup<DiagGroup<"unknown-directives">>;
+  err_pp_invalid_directive.Summary>, InGroup<DiagGroup<"unknown-directives">>;
 def err_pp_directive_required : Error<
   "%0 must be used within a preprocessing directive">;
 def err_pp_file_not_found : Error<"'%0' file not found">, DefaultFatal;
@@ -704,7 +704,7 @@ def ext_pp_bad_paste_ms : ExtWarn<
 def err_pp_operator_used_as_macro_name : Error<
   "C++ operator %0 (aka %1) used as a macro name">;
 def ext_pp_operator_used_as_macro_name : Extension<
-  err_pp_operator_used_as_macro_name.Text>, InGroup<MicrosoftCppMacro>;
+  err_pp_operator_used_as_macro_name.Summary>, InGroup<MicrosoftCppMacro>;
 def err_pp_illegal_floating_literal : Error<
   "floating point literal in preprocessor expression">;
 def err_pp_line_requires_integer : Error<

diff  --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index 247d8e7401af5..ab06c1fea215b 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -184,7 +184,7 @@ def err_designator_for_scalar_or_sizeless_init : Error<
 def warn_initializer_overrides : Warning<
   "initializer %select{partially |}0overrides prior initialization of "
   "this subobject">, InGroup<InitializerOverrides>;
-def ext_initializer_overrides : ExtWarn<warn_initializer_overrides.Text>,
+def ext_initializer_overrides : ExtWarn<warn_initializer_overrides.Summary>,
   InGroup<InitializerOverrides>, SFINAEFailure;
 def err_initializer_overrides_destructed : Error<
   "initializer would partially override prior initialization of object of "
@@ -456,7 +456,7 @@ def warn_decl_shadow :
           "structured binding}1">,
   InGroup<Shadow>, DefaultIgnore, SuppressInSystemMacro;
 def warn_decl_shadow_uncaptured_local :
-  Warning<warn_decl_shadow.Text>,
+  Warning<warn_decl_shadow.Summary>,
   InGroup<ShadowUncapturedLocal>, DefaultIgnore;
 def warn_ctor_parm_shadows_field:
   Warning<"constructor parameter %0 shadows the field %1 of %2">,
@@ -830,7 +830,7 @@ def warn_builtin_chk_overflow : Warning<
   InGroup<DiagGroup<"builtin-memcpy-chk-size">>;
 
 def warn_fortify_source_overflow
-  : Warning<warn_builtin_chk_overflow.Text>, InGroup<FortifySource>;
+  : Warning<warn_builtin_chk_overflow.Summary>, InGroup<FortifySource>;
 def warn_fortify_source_size_mismatch : Warning<
   "'%0' size argument is too large; destination buffer has size %1,"
   " but size argument is %2">, InGroup<FortifySource>;
@@ -946,7 +946,7 @@ def warn_pragma_pack_invalid_alignment : Warning<
   "expected #pragma pack parameter to be '1', '2', '4', '8', or '16'">,
   InGroup<IgnoredPragmas>;
 def err_pragma_pack_invalid_alignment : Error<
-  warn_pragma_pack_invalid_alignment.Text>;
+  warn_pragma_pack_invalid_alignment.Summary>;
 def warn_pragma_pack_non_default_at_include : Warning<
   "non-default #pragma pack value changes the alignment of struct or union "
   "members in the included file">, InGroup<PragmaPackSuspiciousInclude>,
@@ -1083,7 +1083,7 @@ def warn_protocol_property_mismatch : Warning<
   "property %select{of type %1|with attribute '%1'|without attribute '%1'|with "
   "getter %1|with setter %1}0 was selected for synthesis">,
   InGroup<DiagGroup<"protocol-property-synthesis-ambiguity">>;
-def err_protocol_property_mismatch: Error<warn_protocol_property_mismatch.Text>;
+def err_protocol_property_mismatch: Error<warn_protocol_property_mismatch.Summary>;
 def err_undef_interface : Error<"cannot find interface declaration for %0">;
 def err_category_forward_interface : Error<
   "cannot define %select{category|class extension}0 for undefined class %1">;
@@ -1300,7 +1300,7 @@ def warn_objc_pointer_masking : Warning<
   "bitmasking for introspection of Objective-C object pointers is strongly "
   "discouraged">,
   InGroup<ObjCPointerIntrospect>;
-def warn_objc_pointer_masking_performSelector : Warning<warn_objc_pointer_masking.Text>,
+def warn_objc_pointer_masking_performSelector : Warning<warn_objc_pointer_masking.Summary>,
   InGroup<ObjCPointerIntrospectPerformSelector>;
 def warn_objc_property_default_assign_on_object : Warning<
   "default property attribute 'assign' not appropriate for object">,
@@ -1504,7 +1504,7 @@ def warn_potentially_direct_selector_expression : Warning<
   "@selector expression formed with potentially direct selector %0">,
   InGroup<ObjCPotentiallyDirectSelector>;
 def warn_strict_potentially_direct_selector_expression : Warning<
-  warn_potentially_direct_selector_expression.Text>,
+  warn_potentially_direct_selector_expression.Summary>,
   InGroup<ObjCStrictPotentiallyDirectSelector>, DefaultIgnore;
 
 def err_objc_kindof_nonobject : Error<
@@ -1690,31 +1690,31 @@ def err_incomplete_in_exception_spec : Error<
 def err_sizeless_in_exception_spec : Error<
   "%select{|reference to }0sizeless type %1 is not allowed "
   "in exception specification">;
-def ext_incomplete_in_exception_spec : ExtWarn<err_incomplete_in_exception_spec.Text>,
+def ext_incomplete_in_exception_spec : ExtWarn<err_incomplete_in_exception_spec.Summary>,
   InGroup<MicrosoftExceptionSpec>;
 def err_rref_in_exception_spec : Error<
   "rvalue reference type %0 is not allowed in exception specification">;
 def err_mismatched_exception_spec : Error<
   "exception specification in declaration does not match previous declaration">;
-def ext_mismatched_exception_spec : ExtWarn<err_mismatched_exception_spec.Text>,
+def ext_mismatched_exception_spec : ExtWarn<err_mismatched_exception_spec.Summary>,
   InGroup<MicrosoftExceptionSpec>;
 def err_override_exception_spec : Error<
   "exception specification of overriding function is more lax than "
   "base version">;
-def ext_override_exception_spec : ExtWarn<err_override_exception_spec.Text>,
+def ext_override_exception_spec : ExtWarn<err_override_exception_spec.Summary>,
   InGroup<MicrosoftExceptionSpec>;
 def err_incompatible_exception_specs : Error<
   "target exception specification is not superset of source">;
 def warn_incompatible_exception_specs : Warning<
-  err_incompatible_exception_specs.Text>, InGroup<IncompatibleExceptionSpec>;
+  err_incompatible_exception_specs.Summary>, InGroup<IncompatibleExceptionSpec>;
 def err_deep_exception_specs_
diff er : Error<
   "exception specifications of %select{return|argument}0 types 
diff er">;
 def warn_deep_exception_specs_
diff er : Warning<
-  err_deep_exception_specs_
diff er.Text>, InGroup<IncompatibleExceptionSpec>;
+  err_deep_exception_specs_
diff er.Summary>, InGroup<IncompatibleExceptionSpec>;
 def err_missing_exception_specification : Error<
   "%0 is missing exception specification '%1'">;
 def ext_missing_exception_specification : ExtWarn<
-  err_missing_exception_specification.Text>,
+  err_missing_exception_specification.Summary>,
   InGroup<DiagGroup<"missing-exception-spec">>;
 def err_exception_spec_not_parsed : Error<
   "exception specification is not available until end of class definition">;
@@ -1875,7 +1875,7 @@ def err_static_not_bitfield : Error<"static member %0 cannot be a bit-field">;
 def err_static_out_of_line : Error<
   "'static' can only be specified inside the class definition">;
 def ext_static_out_of_line : ExtWarn<
-  err_static_out_of_line.Text>,
+  err_static_out_of_line.Summary>,
   InGroup<MicrosoftTemplate>;
 def err_storage_class_for_static_member : Error<
   "static data member definition cannot specify a storage class">;
@@ -3075,7 +3075,7 @@ def err_alignas_mismatch : Error<
   "redeclaration has 
diff erent alignment requirement (%1 vs %0)">;
 def err_alignas_underaligned : Error<
   "requested alignment is less than minimum alignment of %1 for type %0">;
-def warn_aligned_attr_underaligned : Warning<err_alignas_underaligned.Text>,
+def warn_aligned_attr_underaligned : Warning<err_alignas_underaligned.Summary>,
   InGroup<IgnoredAttributes>;
 def err_attribute_sizeless_type : Error<
   "%0 attribute cannot be applied to sizeless type %1">;
@@ -3099,7 +3099,7 @@ def note_previous_uuid : Note<"previous uuid specified here">;
 def warn_attribute_pointers_only : Warning<
   "%0 attribute only applies to%select{| constant}1 pointer arguments">,
   InGroup<IgnoredAttributes>;
-def err_attribute_pointers_only : Error<warn_attribute_pointers_only.Text>;
+def err_attribute_pointers_only : Error<warn_attribute_pointers_only.Summary>;
 def err_attribute_integers_only : Error<
   "%0 attribute argument may only refer to a function parameter of integer "
   "type">;
@@ -3335,7 +3335,7 @@ def err_alignment_too_big : Error<
 def err_alignment_not_power_of_two : Error<
   "requested alignment is not a power of 2">;
 def warn_alignment_not_power_of_two : Warning<
-  err_alignment_not_power_of_two.Text>,
+  err_alignment_not_power_of_two.Summary>,
   InGroup<DiagGroup<"non-power-of-two-alignment">>;
 def err_alignment_dependent_typedef_name : Error<
   "requested alignment is dependent but declaration is not dependent">;
@@ -3509,7 +3509,7 @@ def err_alias_not_supported_on_darwin : Error <
 def warn_attribute_wrong_decl_type_str : Warning<
   "%0 attribute only applies to %1">, InGroup<IgnoredAttributes>;
 def err_attribute_wrong_decl_type_str : Error<
-  warn_attribute_wrong_decl_type_str.Text>;
+  warn_attribute_wrong_decl_type_str.Summary>;
 def warn_attribute_wrong_decl_type : Warning<
   "%0 attribute only applies to %select{"
   "functions"
@@ -3526,7 +3526,7 @@ def warn_attribute_wrong_decl_type : Warning<
   "|kernel functions"
   "|non-K&R-style functions}1">,
   InGroup<IgnoredAttributes>;
-def err_attribute_wrong_decl_type : Error<warn_attribute_wrong_decl_type.Text>;
+def err_attribute_wrong_decl_type : Error<warn_attribute_wrong_decl_type.Summary>;
 def warn_type_attribute_wrong_type : Warning<
   "'%0' only applies to %select{function|pointer|"
   "Objective-C object or block pointer}1 types; type here is %2">,
@@ -3558,11 +3558,11 @@ def warn_cconv_unsupported : Warning<
   "|on builtin function"
   "}1">,
   InGroup<IgnoredAttributes>;
-def error_cconv_unsupported : Error<warn_cconv_unsupported.Text>;
+def error_cconv_unsupported : Error<warn_cconv_unsupported.Summary>;
 def err_cconv_knr : Error<
   "function with no prototype cannot use the %0 calling convention">;
 def warn_cconv_knr : Warning<
-  err_cconv_knr.Text>,
+  err_cconv_knr.Summary>,
   InGroup<DiagGroup<"missing-prototype-for-cc">>;
 def err_cconv_varargs : Error<
   "variadic function cannot use %0 calling convention">;
@@ -3638,7 +3638,7 @@ def warn_unguarded_availability :
   Warning<"%0 is only available on %1 %2 or newer">,
   InGroup<UnguardedAvailability>, DefaultIgnore;
 def warn_unguarded_availability_new :
-  Warning<warn_unguarded_availability.Text>,
+  Warning<warn_unguarded_availability.Summary>,
   InGroup<UnguardedAvailabilityNew>;
 def note_decl_unguarded_availability_silence : Note<
   "annotate %select{%1|anonymous %1}0 with an availability attribute to silence this warning">;
@@ -3767,13 +3767,13 @@ def warn_fun_requires_lock : Warning<
 
 // Precise thread safety warnings
 def warn_variable_requires_lock_precise :
-  Warning<warn_variable_requires_lock.Text>,
+  Warning<warn_variable_requires_lock.Summary>,
   InGroup<ThreadSafetyPrecise>, DefaultIgnore;
 def warn_var_deref_requires_lock_precise :
-  Warning<warn_var_deref_requires_lock.Text>,
+  Warning<warn_var_deref_requires_lock.Summary>,
   InGroup<ThreadSafetyPrecise>, DefaultIgnore;
 def warn_fun_requires_lock_precise :
-  Warning<warn_fun_requires_lock.Text>,
+  Warning<warn_fun_requires_lock.Summary>,
   InGroup<ThreadSafetyPrecise>, DefaultIgnore;
 def note_found_mutex_near_match : Note<"found near match '%0'">;
 
@@ -4019,13 +4019,13 @@ def warn_pointer_to_int_cast : Warning<
   "cast to smaller integer type %1 from %0">,
   InGroup<PointerToIntCast>;
 def warn_pointer_to_enum_cast : Warning<
-  warn_pointer_to_int_cast.Text>,
+  warn_pointer_to_int_cast.Summary>,
   InGroup<PointerToEnumCast>;
 def warn_void_pointer_to_int_cast : Warning<
   "cast to smaller integer type %1 from %0">,
   InGroup<VoidPointerToIntCast>;
 def warn_void_pointer_to_enum_cast : Warning<
-  warn_void_pointer_to_int_cast.Text>,
+  warn_void_pointer_to_int_cast.Summary>,
   InGroup<VoidPointerToEnumCast>;
 
 def warn_attribute_ignored_for_field_of_type : Warning<
@@ -4382,7 +4382,7 @@ def err_param_default_argument : Error<
 def err_param_default_argument_redefinition : Error<
   "redefinition of default argument">;
 def ext_param_default_argument_redefinition : ExtWarn<
-  err_param_default_argument_redefinition.Text>,
+  err_param_default_argument_redefinition.Summary>,
   InGroup<MicrosoftDefaultArgRedefinition>;
 def err_param_default_argument_missing : Error<
   "missing default argument on parameter">;
@@ -4779,7 +4779,7 @@ def err_ovl_no_viable_literal_operator : Error<
 def err_template_param_shadow : Error<
   "declaration of %0 shadows template parameter">;
 def ext_template_param_shadow : ExtWarn<
-  err_template_param_shadow.Text>, InGroup<MicrosoftTemplateShadow>;
+  err_template_param_shadow.Summary>, InGroup<MicrosoftTemplateShadow>;
 def note_template_param_here : Note<"template parameter is declared here">;
 def warn_template_export_unsupported : Warning<
   "exported templates are unsupported">;
@@ -5404,7 +5404,7 @@ def err_mismatched_exception_spec_explicit_instantiation : Error<
   "exception specification in explicit instantiation does not match "
   "instantiated one">;
 def ext_mismatched_exception_spec_explicit_instantiation : ExtWarn<
-  err_mismatched_exception_spec_explicit_instantiation.Text>,
+  err_mismatched_exception_spec_explicit_instantiation.Summary>,
   InGroup<MicrosoftExceptionSpec>;
 def err_explicit_instantiation_dependent : Error<
   "explicit instantiation has dependent template arguments">;
@@ -6812,7 +6812,7 @@ def ext_out_of_line_declaration : ExtWarn<
 def err_member_extra_qualification : Error<
   "extra qualification on member %0">;
 def warn_member_extra_qualification : Warning<
-  err_member_extra_qualification.Text>, InGroup<MicrosoftExtraQualification>;
+  err_member_extra_qualification.Summary>, InGroup<MicrosoftExtraQualification>;
 def warn_namespace_member_extra_qualification : Warning<
   "extra qualification on member %0">,
   InGroup<DiagGroup<"extra-qualification">>;
@@ -7048,22 +7048,22 @@ def warn_arith_conv_mixed_enum_types_cxx20 : Warning<
   "
diff erent enumeration types%
diff { ($ and $)|}1,2 is deprecated">,
   InGroup<DeprecatedEnumEnumConversion>;
 def warn_arith_conv_mixed_anon_enum_types : Warning<
-  warn_arith_conv_mixed_enum_types.Text>,
+  warn_arith_conv_mixed_enum_types.Summary>,
   InGroup<AnonEnumEnumConversion>, DefaultIgnore;
 def warn_arith_conv_mixed_anon_enum_types_cxx20 : Warning<
-  warn_arith_conv_mixed_enum_types_cxx20.Text>,
+  warn_arith_conv_mixed_enum_types_cxx20.Summary>,
   InGroup<DeprecatedAnonEnumEnumConversion>;
 def warn_conditional_mixed_enum_types : Warning<
-  warn_arith_conv_mixed_enum_types.Text>,
+  warn_arith_conv_mixed_enum_types.Summary>,
   InGroup<EnumCompareConditional>, DefaultIgnore;
 def warn_conditional_mixed_enum_types_cxx20 : Warning<
-  warn_arith_conv_mixed_enum_types_cxx20.Text>,
+  warn_arith_conv_mixed_enum_types_cxx20.Summary>,
   InGroup<DeprecatedEnumCompareConditional>;
 def warn_comparison_mixed_enum_types : Warning<
-  warn_arith_conv_mixed_enum_types.Text>,
+  warn_arith_conv_mixed_enum_types.Summary>,
   InGroup<EnumCompare>;
 def warn_comparison_mixed_enum_types_cxx20 : Warning<
-  warn_arith_conv_mixed_enum_types_cxx20.Text>,
+  warn_arith_conv_mixed_enum_types_cxx20.Summary>,
   InGroup<DeprecatedEnumCompare>;
 def warn_comparison_of_mixed_enum_types_switch : Warning<
   "comparison of 
diff erent enumeration types in switch statement"
@@ -7123,7 +7123,7 @@ def warn_out_of_range_compare : Warning<
   "result of comparison of %select{constant %0|true|false}1 with "
   "%select{expression of type %2|boolean expression}3 is always %4">,
   InGroup<TautologicalOutOfRangeCompare>;
-def warn_tautological_bool_compare : Warning<warn_out_of_range_compare.Text>,
+def warn_tautological_bool_compare : Warning<warn_out_of_range_compare.Summary>,
   InGroup<TautologicalConstantCompare>;
 def warn_integer_constants_in_conditional_always_true : Warning<
   "converting the result of '?:' with integer constants to a boolean always "
@@ -8094,7 +8094,7 @@ def err_typecheck_convert_pointer_int : Error<
   "; remove *|"
   "; remove &}3">;
 def ext_typecheck_convert_pointer_int : ExtWarn<
-  err_typecheck_convert_pointer_int.Text>,
+  err_typecheck_convert_pointer_int.Summary>,
   InGroup<IntConversion>, DefaultError;
 def err_typecheck_convert_int_pointer : Error<
   "incompatible integer to pointer conversion "
@@ -8114,7 +8114,7 @@ def err_typecheck_convert_int_pointer : Error<
   "; remove *|"
   "; remove &}3">;
 def ext_typecheck_convert_int_pointer : ExtWarn<
-  err_typecheck_convert_int_pointer.Text>,
+  err_typecheck_convert_int_pointer.Summary>,
   InGroup<IntConversion>, DefaultError;
 def ext_typecheck_convert_pointer_void_func : Extension<
   "%select{%
diff {assigning to $ from $|assigning to 
diff erent types}0,1"
@@ -8158,7 +8158,7 @@ def ext_typecheck_convert_incompatible_pointer_sign : ExtWarn<
   "where one is of the unique plain 'char' type and the other is not}3">,
   InGroup<DiagGroup<"pointer-sign">>;
 def err_typecheck_convert_incompatible_pointer_sign :
-  Error<ext_typecheck_convert_incompatible_pointer_sign.Text>;
+  Error<ext_typecheck_convert_incompatible_pointer_sign.Summary>;
 def ext_typecheck_convert_incompatible_pointer : ExtWarn<
   "incompatible pointer types "
   "%select{%
diff {assigning to $ from $|assigning to 
diff erent types}0,1"
@@ -8212,10 +8212,10 @@ def err_typecheck_convert_incompatible_function_pointer : Error<
   "; remove *|"
   "; remove &}3">;
 def ext_typecheck_convert_incompatible_function_pointer : ExtWarn<
-  err_typecheck_convert_incompatible_function_pointer.Text>,
+  err_typecheck_convert_incompatible_function_pointer.Summary>,
   InGroup<IncompatibleFunctionPointerTypes>, DefaultError;
 def warn_typecheck_convert_incompatible_function_pointer_strict : Warning<
-  err_typecheck_convert_incompatible_function_pointer.Text>,
+  err_typecheck_convert_incompatible_function_pointer.Summary>,
   InGroup<DiagGroup<"incompatible-function-pointer-types-strict">>, DefaultIgnore;
 def ext_typecheck_convert_discards_qualifiers : ExtWarn<
   "%select{%
diff {assigning to $ from $|assigning to 
diff erent types}0,1"
@@ -8699,7 +8699,7 @@ def warn_bad_function_cast : Warning<
 def warn_cast_function_type : Warning<
   "cast %
diff {from $ to $ |}0,1converts to incompatible function type">,
   InGroup<CastFunctionType>, DefaultIgnore;
-def warn_cast_function_type_strict : Warning<warn_cast_function_type.Text>,
+def warn_cast_function_type_strict : Warning<warn_cast_function_type.Summary>,
   InGroup<CastFunctionTypeStrict>, DefaultIgnore;
 def err_cast_pointer_to_non_pointer_int : Error<
   "pointer cannot be cast to type %0">;
@@ -9451,17 +9451,17 @@ def warn_format_conversion_argument_type_mismatch : Warning<
   "%select{type|underlying type}2 %1">,
   InGroup<Format>;
 def warn_format_conversion_argument_type_mismatch_pedantic : Extension<
-  warn_format_conversion_argument_type_mismatch.Text>,
+  warn_format_conversion_argument_type_mismatch.Summary>,
   InGroup<FormatPedantic>;
 def warn_format_conversion_argument_type_mismatch_confusion : Warning<
-  warn_format_conversion_argument_type_mismatch.Text>,
+  warn_format_conversion_argument_type_mismatch.Summary>,
   InGroup<FormatTypeConfusion>, DefaultIgnore;
 def warn_format_argument_needs_cast : Warning<
   "%select{values of type|enum values with underlying type}2 '%0' should not "
   "be used as format arguments; add an explicit cast to %1 instead">,
   InGroup<Format>;
 def warn_format_argument_needs_cast_pedantic : Warning<
-  warn_format_argument_needs_cast.Text>,
+  warn_format_argument_needs_cast.Summary>,
   InGroup<FormatPedantic>, DefaultIgnore;
 def warn_printf_positional_arg_exceeds_data_args : Warning <
   "data argument position '%0' exceeds the number of data arguments (%1)">,
@@ -10104,9 +10104,9 @@ def err_nserrordomain_wrong_type : Error<
   "domain argument %0 does not point to an NSString or CFString constant">;
 
 def warn_nsconsumed_attribute_mismatch : Warning<
-  err_nsconsumed_attribute_mismatch.Text>, InGroup<NSConsumedMismatch>;
+  err_nsconsumed_attribute_mismatch.Summary>, InGroup<NSConsumedMismatch>;
 def warn_nsreturns_retained_attribute_mismatch : Warning<
-  err_nsreturns_retained_attribute_mismatch.Text>, InGroup<NSReturnsMismatch>;
+  err_nsreturns_retained_attribute_mismatch.Summary>, InGroup<NSReturnsMismatch>;
 
 def note_getter_unavailable : Note<
   "or because setter is declared here, but no getter method %0 is found">;

diff  --git a/clang/test/TableGen/DiagnosticBase.inc b/clang/test/TableGen/DiagnosticBase.inc
index 27166c000953b..2fc7bb4266edb 100644
--- a/clang/test/TableGen/DiagnosticBase.inc
+++ b/clang/test/TableGen/DiagnosticBase.inc
@@ -67,10 +67,10 @@ class InGroup<DiagGroup G> { DiagGroup Group = G; }
 include "DiagnosticDocs.inc"
 
 // All diagnostics emitted by the compiler are an indirect subclass of this.
-class Diagnostic<string text, DiagClass DC, Severity defaultmapping> {
+class Diagnostic<string summary, DiagClass DC, Severity defaultmapping> {
   /// Component is specified by the file with a big let directive.
   string         Component = ?;
-  string         Text = text;
+  string         Summary = summary;
   DiagClass      Class = DC;
   SFINAEResponse SFINAE = SFINAE_Suppress;
   bit            AccessControl = 0;

diff  --git a/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp b/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
index 3afd87c698801..ec682edb57f63 100644
--- a/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
+++ b/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
@@ -1165,7 +1165,7 @@ std::vector<std::string>
 DiagnosticTextBuilder::buildForDocumentation(StringRef Severity,
                                              const Record *R) {
   EvaluatingRecordGuard Guard(&EvaluatingRecord, R);
-  StringRef Text = R->getValueAsString("Text");
+  StringRef Text = R->getValueAsString("Summary");
 
   DiagText D(*this, Text);
   TextPiece *Prefix = D.New<TextPiece>(Severity, Severity);
@@ -1184,7 +1184,7 @@ DiagnosticTextBuilder::buildForDocumentation(StringRef Severity,
 
 std::string DiagnosticTextBuilder::buildForDefinition(const Record *R) {
   EvaluatingRecordGuard Guard(&EvaluatingRecord, R);
-  StringRef Text = R->getValueAsString("Text");
+  StringRef Text = R->getValueAsString("Summary");
   DiagText D(*this, Text);
   std::string Result;
   DiagTextPrinter{*this, Result}.Visit(D.Root);
@@ -1702,7 +1702,7 @@ void writeHeader(StringRef Str, raw_ostream &OS, char Kind = '-') {
 
 void writeDiagnosticText(DiagnosticTextBuilder &Builder, const Record *R,
                          StringRef Role, raw_ostream &OS) {
-  StringRef Text = R->getValueAsString("Text");
+  StringRef Text = R->getValueAsString("Summary");
   if (Text == "%0")
     OS << "The text of this diagnostic is not controlled by Clang.\n\n";
   else {


        


More information about the cfe-commits mailing list