cjdb created this revision.
cjdb added reviewers: aaron.ballman, erichkeane, shafik.
Herald added a subscriber: arphaman.
Herald added a project: All.
cjdb requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

The [Improving Clang's Diagnostics RFC][1] identifies eight broad fields
for Clang to surface, two of which are text-based. Since the current
diagnostics more closely map to the diagnostic summary (or headline), we
should rename them to ensure that there's no confusion when
Diagnostic.Reason is introduced in the near future.

[1]: https://discourse.llvm.org/t/rfc-improving-clang-s-diagnostics/62584


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135820

Files:
  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

Index: clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
===================================================================
--- clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
+++ clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
@@ -1165,7 +1165,7 @@
 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 @@
 
 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 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 {
Index: clang/test/TableGen/DiagnosticBase.inc
===================================================================
--- clang/test/TableGen/DiagnosticBase.inc
+++ clang/test/TableGen/DiagnosticBase.inc
@@ -39,8 +39,8 @@
 def SFINAE_AccessControl       : SFINAEResponse;
 
 // Textual substitutions which may be performed on the text of diagnostics
-class TextSubstitution<string Text> {
-  string Substitution = Text;
+class TextSubstitution<string Summary> {
+  string Substitution = Summary;
   // TODO: These are only here to allow substitutions to be declared inline with
   // diagnostics
   string Component = "";
@@ -67,10 +67,10 @@
 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;
Index: clang/include/clang/Basic/DiagnosticSemaKinds.td
===================================================================
--- clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -184,7 +184,7 @@
 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 @@
           "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 @@
   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 @@
   "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 @@
   "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 @@
   "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 @@
   "@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_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_differ : Error<
   "exception specifications of %select{return|argument}0 types differ">;
 def warn_deep_exception_specs_differ : Warning<
-  err_deep_exception_specs_differ.Text>, InGroup<IncompatibleExceptionSpec>;
+  err_deep_exception_specs_differ.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_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 @@
   "redeclaration has different 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 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_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 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 @@
   "|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 @@
   "|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 @@
   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 @@
 
 // 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 @@
   "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_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_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">;
@@ -5400,7 +5400,7 @@
   "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">;
@@ -6808,7 +6808,7 @@
 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">>;
@@ -7044,22 +7044,22 @@
   "different 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 different enumeration types in switch statement"
@@ -7119,7 +7119,7 @@
   "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 "
@@ -8090,7 +8090,7 @@
   "; 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 "
@@ -8110,7 +8110,7 @@
   "; 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 different types}0,1"
@@ -8154,7 +8154,7 @@
   "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 different types}0,1"
@@ -8208,7 +8208,7 @@
   "; 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 ext_typecheck_convert_discards_qualifiers : ExtWarn<
   "%select{%diff{assigning to $ from $|assigning to different types}0,1"
@@ -9440,17 +9440,17 @@
   "%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)">,
@@ -10093,9 +10093,9 @@
   "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">;
Index: clang/include/clang/Basic/DiagnosticLexKinds.td
===================================================================
--- clang/include/clang/Basic/DiagnosticLexKinds.td
+++ clang/include/clang/Basic/DiagnosticLexKinds.td
@@ -461,7 +461,7 @@
 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;
@@ -700,7 +700,7 @@
 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<
Index: clang/include/clang/Basic/DiagnosticFrontendKinds.td
===================================================================
--- clang/include/clang/Basic/DiagnosticFrontendKinds.td
+++ clang/include/clang/Basic/DiagnosticFrontendKinds.td
@@ -274,7 +274,7 @@
     : 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 "
Index: clang/include/clang/Basic/DiagnosticCommonKinds.td
===================================================================
--- clang/include/clang/Basic/DiagnosticCommonKinds.td
+++ clang/include/clang/Basic/DiagnosticCommonKinds.td
@@ -269,7 +269,7 @@
   "%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 {
Index: clang/include/clang/Basic/Diagnostic.td
===================================================================
--- clang/include/clang/Basic/Diagnostic.td
+++ clang/include/clang/Basic/Diagnostic.td
@@ -39,8 +39,8 @@
 def SFINAE_AccessControl       : SFINAEResponse;
 
 // Textual substitutions which may be performed on the text of diagnostics
-class TextSubstitution<string Text> {
-  string Substitution = Text;
+class TextSubstitution<string Summary> {
+  string Substitution = Summary;
   // TODO: These are only here to allow substitutions to be declared inline with
   // diagnostics
   string Component = "";
@@ -75,10 +75,10 @@
 
 
 // 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;
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to