diff --git a/clang/include/clang/Basic/Diagnostic.td b/clang/include/clang/Basic/Diagnostic.td --- a/clang/include/clang/Basic/Diagnostic.td +++ b/clang/include/clang/Basic/Diagnostic.td @@ -75,10 +75,10 @@ // All diagnostics emitted by the compiler are an indirect subclass of this. -class Diagnostic { +class Diagnostic { /// 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 --- a/clang/include/clang/Basic/DiagnosticCommonKinds.td +++ b/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 { diff --git a/clang/include/clang/Basic/DiagnosticFrontendKinds.td b/clang/include/clang/Basic/DiagnosticFrontendKinds.td --- a/clang/include/clang/Basic/DiagnosticFrontendKinds.td +++ b/clang/include/clang/Basic/DiagnosticFrontendKinds.td @@ -276,7 +276,7 @@ : Warning<"AVX vector %select{return|argument}0 of type %1 without '%2' " "enabled changes the ABI">, InGroup>; -def err_avx_calling_convention : Error; +def err_avx_calling_convention : Error; 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 --- a/clang/include/clang/Basic/DiagnosticLexKinds.td +++ b/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>; + err_pp_invalid_directive.Summary>, InGroup>; 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 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; + err_pp_operator_used_as_macro_name.Summary>, InGroup; 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 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/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; -def ext_initializer_overrides : ExtWarn, +def ext_initializer_overrides : ExtWarn, InGroup, SFINAEFailure; def err_initializer_overrides_destructed : Error< "initializer would partially override prior initialization of object of " @@ -456,7 +456,7 @@ "structured binding}1">, InGroup, DefaultIgnore, SuppressInSystemMacro; def warn_decl_shadow_uncaptured_local : - Warning, + Warning, InGroup, DefaultIgnore; def warn_ctor_parm_shadows_field: Warning<"constructor parameter %0 shadows the field %1 of %2">, @@ -830,7 +830,7 @@ InGroup>; def warn_fortify_source_overflow - : Warning, InGroup; + : Warning, InGroup; def warn_fortify_source_size_mismatch : Warning< "'%0' size argument is too large; destination buffer has size %1," " but size argument is %2">, InGroup; @@ -946,7 +946,7 @@ "expected #pragma pack parameter to be '1', '2', '4', '8', or '16'">, InGroup; 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, @@ -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>; -def err_protocol_property_mismatch: Error; +def err_protocol_property_mismatch: Error; 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; -def warn_objc_pointer_masking_performSelector : Warning, +def warn_objc_pointer_masking_performSelector : Warning, InGroup; 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; def warn_strict_potentially_direct_selector_expression : Warning< - warn_potentially_direct_selector_expression.Text>, + warn_potentially_direct_selector_expression.Summary>, InGroup, 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, +def ext_incomplete_in_exception_spec : ExtWarn, InGroup; 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, +def ext_mismatched_exception_spec : ExtWarn, InGroup; def err_override_exception_spec : Error< "exception specification of overriding function is more lax than " "base version">; -def ext_override_exception_spec : ExtWarn, +def ext_override_exception_spec : ExtWarn, InGroup; 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; + err_incompatible_exception_specs.Summary>, InGroup; 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; + err_deep_exception_specs_differ.Summary>, InGroup; 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>; 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; 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, +def warn_aligned_attr_underaligned : Warning, InGroup; 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; -def err_attribute_pointers_only : Error; +def err_attribute_pointers_only : Error; 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>; 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; 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; -def err_attribute_wrong_decl_type : Error; +def err_attribute_wrong_decl_type : Error; 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; -def error_cconv_unsupported : Error; +def error_cconv_unsupported : Error; 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>; 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, DefaultIgnore; def warn_unguarded_availability_new : - Warning, + Warning, InGroup; 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, + Warning, InGroup, DefaultIgnore; def warn_var_deref_requires_lock_precise : - Warning, + Warning, InGroup, DefaultIgnore; def warn_fun_requires_lock_precise : - Warning, + Warning, InGroup, 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; def warn_pointer_to_enum_cast : Warning< - warn_pointer_to_int_cast.Text>, + warn_pointer_to_int_cast.Summary>, InGroup; def warn_void_pointer_to_int_cast : Warning< "cast to smaller integer type %1 from %0">, InGroup; def warn_void_pointer_to_enum_cast : Warning< - warn_void_pointer_to_int_cast.Text>, + warn_void_pointer_to_int_cast.Summary>, InGroup; 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; 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; + err_template_param_shadow.Summary>, InGroup; 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 @@ "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; def err_explicit_instantiation_dependent : Error< "explicit instantiation has dependent template arguments">; @@ -6812,7 +6812,7 @@ def err_member_extra_qualification : Error< "extra qualification on member %0">; def warn_member_extra_qualification : Warning< - err_member_extra_qualification.Text>, InGroup; + err_member_extra_qualification.Summary>, InGroup; def warn_namespace_member_extra_qualification : Warning< "extra qualification on member %0">, InGroup>; @@ -7048,22 +7048,22 @@ "different enumeration types%diff{ ($ and $)|}1,2 is deprecated">, InGroup; def warn_arith_conv_mixed_anon_enum_types : Warning< - warn_arith_conv_mixed_enum_types.Text>, + warn_arith_conv_mixed_enum_types.Summary>, InGroup, 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; def warn_conditional_mixed_enum_types : Warning< - warn_arith_conv_mixed_enum_types.Text>, + warn_arith_conv_mixed_enum_types.Summary>, InGroup, 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; def warn_comparison_mixed_enum_types : Warning< - warn_arith_conv_mixed_enum_types.Text>, + warn_arith_conv_mixed_enum_types.Summary>, InGroup; 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; def warn_comparison_of_mixed_enum_types_switch : Warning< "comparison of different enumeration types in switch statement" @@ -7123,7 +7123,7 @@ "result of comparison of %select{constant %0|true|false}1 with " "%select{expression of type %2|boolean expression}3 is always %4">, InGroup; -def warn_tautological_bool_compare : Warning, +def warn_tautological_bool_compare : Warning, InGroup; def warn_integer_constants_in_conditional_always_true : Warning< "converting the result of '?:' with integer constants to a boolean always " @@ -8094,7 +8094,7 @@ "; remove *|" "; remove &}3">; def ext_typecheck_convert_pointer_int : ExtWarn< - err_typecheck_convert_pointer_int.Text>, + err_typecheck_convert_pointer_int.Summary>, InGroup, DefaultError; def err_typecheck_convert_int_pointer : Error< "incompatible integer to pointer conversion " @@ -8114,7 +8114,7 @@ "; remove *|" "; remove &}3">; def ext_typecheck_convert_int_pointer : ExtWarn< - err_typecheck_convert_int_pointer.Text>, + err_typecheck_convert_int_pointer.Summary>, InGroup, DefaultError; def ext_typecheck_convert_pointer_void_func : Extension< "%select{%diff{assigning to $ from $|assigning to different types}0,1" @@ -8158,7 +8158,7 @@ "where one is of the unique plain 'char' type and the other is not}3">, InGroup>; def err_typecheck_convert_incompatible_pointer_sign : - Error; + Error; def ext_typecheck_convert_incompatible_pointer : ExtWarn< "incompatible pointer types " "%select{%diff{assigning to $ from $|assigning to different types}0,1" @@ -8212,7 +8212,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, DefaultError; def warn_typecheck_convert_incompatible_function_pointer_strict : Warning< err_typecheck_convert_incompatible_function_pointer.Text>, @@ -9451,17 +9451,17 @@ "%select{type|underlying type}2 %1">, InGroup; def warn_format_conversion_argument_type_mismatch_pedantic : Extension< - warn_format_conversion_argument_type_mismatch.Text>, + warn_format_conversion_argument_type_mismatch.Summary>, InGroup; def warn_format_conversion_argument_type_mismatch_confusion : Warning< - warn_format_conversion_argument_type_mismatch.Text>, + warn_format_conversion_argument_type_mismatch.Summary>, InGroup, 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; def warn_format_argument_needs_cast_pedantic : Warning< - warn_format_argument_needs_cast.Text>, + warn_format_argument_needs_cast.Summary>, InGroup, 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 @@ "domain argument %0 does not point to an NSString or CFString constant">; def warn_nsconsumed_attribute_mismatch : Warning< - err_nsconsumed_attribute_mismatch.Text>, InGroup; + err_nsconsumed_attribute_mismatch.Summary>, InGroup; def warn_nsreturns_retained_attribute_mismatch : Warning< - err_nsreturns_retained_attribute_mismatch.Text>, InGroup; + err_nsreturns_retained_attribute_mismatch.Summary>, InGroup; 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 --- a/clang/test/TableGen/DiagnosticBase.inc +++ b/clang/test/TableGen/DiagnosticBase.inc @@ -67,10 +67,10 @@ include "DiagnosticDocs.inc" // All diagnostics emitted by the compiler are an indirect subclass of this. -class Diagnostic { +class Diagnostic { /// 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 --- a/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp +++ b/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(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 {