[cfe-commits] r172088 - in /cfe/trunk/include/clang/Basic: DiagnosticDriverKinds.td DiagnosticFrontendKinds.td DiagnosticGroups.td DiagnosticLexKinds.td DiagnosticSemaKinds.td
Jordan Rose
jordan_rose at apple.com
Thu Jan 10 10:50:51 PST 2013
Author: jrose
Date: Thu Jan 10 12:50:51 2013
New Revision: 172088
URL: http://llvm.org/viewvc/llvm-project?rev=172088&view=rev
Log:
Diagnostics: name all implicit groups used more than once.
This will be a new style requirement going forwards: a diagnostic can only
use the implicit InGroup<DiagGroup<"foo">> syntax if "foo" is not used by
any other diagnostics; as soon as it is, it needs an explicit group.
This also brings some stray "conversion" diagnostics into the
"Value Conversion Issue" category, instead of the more generic
"Semantic Issue" category. I consider this an improvement!
- warn_impcast_complex_scalar
- warn_impcast_float_integer
- warn_impcast_float_precision
- warn_impcast_integer_precision
- warn_impcast_vector_scalar
Modified:
cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td
cfe/trunk/include/clang/Basic/DiagnosticGroups.td
cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=172088&r1=172087&r2=172088&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td Thu Jan 10 12:50:51 2013
@@ -110,19 +110,19 @@
"ignoring -fapple-kext which is valid for C++ and Objective-C++ only">;
def warn_drv_input_file_unused : Warning<
"%0: '%1' input unused%select{ when '%3' is present|}2">,
- InGroup<DiagGroup<"unused-command-line-argument">>;
+ InGroup<UnusedCommandLineArgument>;
def warn_drv_input_file_unused_by_cpp : Warning<
"%0: '%1' input unused in cpp mode">,
- InGroup<DiagGroup<"unused-command-line-argument">>;
+ InGroup<UnusedCommandLineArgument>;
def warn_drv_preprocessed_input_file_unused : Warning<
"%0: previously preprocessed input%select{ unused when '%2' is present|}1">,
- InGroup<DiagGroup<"unused-command-line-argument">>;
+ InGroup<UnusedCommandLineArgument>;
def warn_drv_unused_argument : Warning<
"argument unused during compilation: '%0'">,
- InGroup<DiagGroup<"unused-command-line-argument">>;
+ InGroup<UnusedCommandLineArgument>;
def warn_drv_empty_joined_argument : Warning<
"joined argument expects additional value: '%0'">,
- InGroup<DiagGroup<"unused-command-line-argument">>;
+ InGroup<UnusedCommandLineArgument>;
def warn_drv_clang_unsupported : Warning<
"the clang compiler does not support '%0'">;
def warn_drv_deprecated_arg : Warning<
Modified: cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td?rev=172088&r1=172087&r2=172088&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td Thu Jan 10 12:50:51 2013
@@ -102,19 +102,19 @@
def warn_unknown_warning_option : Warning<
"unknown warning option '%0'">,
- InGroup<DiagGroup<"unknown-warning-option"> >;
+ InGroup<UnknownWarningOption>;
def warn_unknown_negative_warning_option : Warning<
"unknown warning option '%0'">,
- InGroup<DiagGroup<"unknown-warning-option"> >;
+ InGroup<UnknownWarningOption>;
def warn_unknown_warning_option_suggest : Warning<
"unknown warning option '%0'; did you mean '%1'?">,
- InGroup<DiagGroup<"unknown-warning-option"> >;
+ InGroup<UnknownWarningOption>;
def warn_unknown_negative_warning_option_suggest : Warning<
"unknown warning option '%0'; did you mean '%1'?">,
- InGroup<DiagGroup<"unknown-warning-option"> >;
+ InGroup<UnknownWarningOption>;
def warn_unknown_warning_specifier : Warning<
"unknown %0 warning specifier: '%1'">,
- InGroup<DiagGroup<"unknown-warning-option"> >;
+ InGroup<UnknownWarningOption>;
def err_unknown_analyzer_checker : Error<
"no analyzer checkers are associated with '%0'">;
Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=172088&r1=172087&r2=172088&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Thu Jan 10 12:50:51 2013
@@ -22,6 +22,8 @@
def AddressOfTemporary : DiagGroup<"address-of-temporary">;
def : DiagGroup<"aggregate-return">;
def AmbigMemberTemplate : DiagGroup<"ambiguous-member-template">;
+def ArrayBounds : DiagGroup<"array-bounds">;
+def ArrayBoundsPointerArithmetic : DiagGroup<"array-bounds-pointer-arithmetic">;
def Availability : DiagGroup<"availability">;
def Section : DiagGroup<"section">;
def AutoImport : DiagGroup<"auto-import">;
@@ -36,6 +38,7 @@
def NullConversion : DiagGroup<"null-conversion">;
def ImplicitConversionFloatingPointToBool :
DiagGroup<"implicit-conversion-floating-point-to-bool">;
+def BadArrayNewLength : DiagGroup<"bad-array-new-length">;
def BuiltinRequiresHeader : DiagGroup<"builtin-requires-header">;
def CXXCompat: DiagGroup<"c++-compat">;
def CastAlign : DiagGroup<"cast-align">;
@@ -117,10 +120,14 @@
def LogicalOpParentheses: DiagGroup<"logical-op-parentheses">;
def ShiftOpParentheses: DiagGroup<"shift-op-parentheses">;
def DanglingElse: DiagGroup<"dangling-else">;
+def DanglingField : DiagGroup<"dangling-field">;
+def DistributedObjectModifiers : DiagGroup<"distributed-object-modifiers">;
def IgnoredQualifiers : DiagGroup<"ignored-qualifiers">;
def : DiagGroup<"import">;
def IncompatiblePointerTypes : DiagGroup<"incompatible-pointer-types">;
def IncompleteUmbrella : DiagGroup<"incomplete-umbrella">;
+def InvalidNoreturn : DiagGroup<"invalid-noreturn">;
+def InvalidSourceEncoding : DiagGroup<"invalid-source-encoding">;
def KNRPromotedParameter : DiagGroup<"knr-promoted-parameter">;
def : DiagGroup<"init-self">;
def : DiagGroup<"inline">;
@@ -135,18 +142,22 @@
def MissingDeclarations: DiagGroup<"missing-declarations">;
def : DiagGroup<"missing-format-attribute">;
def : DiagGroup<"missing-include-dirs">;
+def MissingNoreturn : DiagGroup<"missing-noreturn">;
def MultiChar : DiagGroup<"multichar">;
def : DiagGroup<"nested-externs">;
def CXX11LongLong : DiagGroup<"c++11-long-long">;
def LongLong : DiagGroup<"long-long", [CXX11LongLong]>;
+def MethodSignatures : DiagGroup<"method-signatures">;
def MismatchedParameterTypes : DiagGroup<"mismatched-parameter-types">;
def MismatchedReturnTypes : DiagGroup<"mismatched-return-types">;
def MismatchedTags : DiagGroup<"mismatched-tags">;
def MissingFieldInitializers : DiagGroup<"missing-field-initializers">;
+def NullArithmetic : DiagGroup<"null-arithmetic">;
def NullCharacter : DiagGroup<"null-character">;
def NullDereference : DiagGroup<"null-dereference">;
def InitializerOverrides : DiagGroup<"initializer-overrides">;
def NonNull : DiagGroup<"nonnull">;
+def NonPODVarargs : DiagGroup<"non-pod-varargs">;
def : DiagGroup<"nonportable-cfstrings">;
def NonVirtualDtor : DiagGroup<"non-virtual-dtor">;
def OveralignedType : DiagGroup<"over-aligned">;
@@ -177,6 +188,7 @@
DiagCategory<"#pragma message Directive">;
def : DiagGroup<"pointer-to-int-cast">;
def : DiagGroup<"redundant-decls">;
+def ReturnStackAddress : DiagGroup<"return-stack-address">;
def ReturnTypeCLinkage : DiagGroup<"return-type-c-linkage">;
def ReturnType : DiagGroup<"return-type", [ReturnTypeCLinkage]>;
def BindToTemporaryCopy : DiagGroup<"bind-to-temporary-copy",
@@ -195,6 +207,8 @@
def : DiagGroup<"switch-default">;
def : DiagGroup<"synth">;
def SizeofArrayArgument : DiagGroup<"sizeof-array-argument">;
+def SizeofPointerMemaccess : DiagGroup<"sizeof-pointer-memaccess">;
+def StaticInInline : DiagGroup<"static-in-inline">;
def StringPlusInt : DiagGroup<"string-plus-int">;
def StrncatSize : DiagGroup<"strncat-size">;
def TautologicalOutOfRangeCompare : DiagGroup<"tautological-constant-out-of-range-compare">;
@@ -238,17 +252,20 @@
def Trigraphs : DiagGroup<"trigraphs">;
def : DiagGroup<"type-limits">;
+def UndefinedReinterpretCast : DiagGroup<"undefined-reinterpret-cast">;
def Unicode : DiagGroup<"unicode">;
def UninitializedMaybe : DiagGroup<"conditional-uninitialized">;
def UninitializedSometimes : DiagGroup<"sometimes-uninitialized">;
def Uninitialized : DiagGroup<"uninitialized", [UninitializedSometimes]>;
def UnknownPragmas : DiagGroup<"unknown-pragmas">;
+def UnknownWarningOption : DiagGroup<"unknown-warning-option">;
def NSobjectAttribute : DiagGroup<"NSObject-attribute">;
def UnknownAttributes : DiagGroup<"attributes">;
def IgnoredAttributes : DiagGroup<"ignored-attributes">;
def UnnamedTypeTemplateArgs : DiagGroup<"unnamed-type-template-args",
[CXX98CompatUnnamedTypeTemplateArgs]>;
def UnusedArgument : DiagGroup<"unused-argument">;
+def UnusedCommandLineArgument : DiagGroup<"unused-command-line-argument">;
def UnusedComparison : DiagGroup<"unused-comparison">;
def UnusedExceptionParameter : DiagGroup<"unused-exception-parameter">;
def UnneededInternalDecl : DiagGroup<"unneeded-internal-declaration">;
Modified: cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td?rev=172088&r1=172087&r2=172088&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td Thu Jan 10 12:50:51 2013
@@ -175,12 +175,12 @@
"illegal character encoding in string literal">;
def warn_bad_string_encoding : ExtWarn<
"illegal character encoding in string literal">,
- InGroup<DiagGroup<"invalid-source-encoding">>;
+ InGroup<InvalidSourceEncoding>;
def err_bad_character_encoding : Error<
"illegal character encoding in character literal">;
def warn_bad_character_encoding : ExtWarn<
"illegal character encoding in character literal">,
- InGroup<DiagGroup<"invalid-source-encoding">>;
+ InGroup<InvalidSourceEncoding>;
def err_lexing_string : Error<"failure when lexing a string">;
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=172088&r1=172087&r2=172088&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Thu Jan 10 12:50:51 2013
@@ -309,10 +309,10 @@
"control reaches end of non-void block">;
def warn_suggest_noreturn_function : Warning<
"%select{function|method}0 %1 could be declared with attribute 'noreturn'">,
- InGroup<DiagGroup<"missing-noreturn">>, DefaultIgnore;
+ InGroup<MissingNoreturn>, DefaultIgnore;
def warn_suggest_noreturn_block : Warning<
"block could be declared with attribute 'noreturn'">,
- InGroup<DiagGroup<"missing-noreturn">>, DefaultIgnore;
+ InGroup<MissingNoreturn>, DefaultIgnore;
def warn_unreachable : Warning<"will never be executed">,
InGroup<DiagGroup<"unreachable-code">>, DefaultIgnore;
@@ -352,7 +352,7 @@
def warn_sizeof_pointer_expr_memaccess : Warning<
"'%0' call operates on objects of type %1 while the size is based on a "
"different type %2">,
- InGroup<DiagGroup<"sizeof-pointer-memaccess">>;
+ InGroup<SizeofPointerMemaccess>;
def warn_sizeof_pointer_expr_memaccess_note : Note<
"did you mean to %select{dereference the argument to 'sizeof' (and multiply "
"it by the number of elements)|remove the addressof in the argument to "
@@ -361,7 +361,7 @@
def warn_sizeof_pointer_type_memaccess : Warning<
"argument to 'sizeof' in %0 call is the same pointer type %1 as the "
"%select{destination|source}2; expected %3 or an explicit length">,
- InGroup<DiagGroup<"sizeof-pointer-memaccess">>;
+ InGroup<SizeofPointerMemaccess>;
def warn_strlcpycat_wrong_size : Warning<
"size argument in %0 call appears to be size of the source; expected the size of "
"the destination">,
@@ -528,7 +528,7 @@
def warn_conflicting_ret_type_modifiers : Warning<
"conflicting distributed object modifiers on return type "
"in implementation of %0">,
- InGroup<DiagGroup<"distributed-object-modifiers">>;
+ InGroup<DistributedObjectModifiers>;
def warn_non_covariant_overriding_ret_types : Warning<
"conflicting return type in "
@@ -538,7 +538,7 @@
def warn_non_covariant_ret_types : Warning<
"conflicting return type in "
"implementation of %0: %1 vs %2">,
- InGroup<DiagGroup<"method-signatures">>, DefaultIgnore;
+ InGroup<MethodSignatures>, DefaultIgnore;
def warn_conflicting_overriding_param_types : Warning<
"conflicting parameter types in "
@@ -553,7 +553,7 @@
def warn_conflicting_param_modifiers : Warning<
"conflicting distributed object modifiers on parameter type "
"in implementation of %0">,
- InGroup<DiagGroup<"distributed-object-modifiers">>;
+ InGroup<DistributedObjectModifiers>;
def warn_conflicting_overriding_param_modifiers : Warning<
"conflicting distributed object modifiers on parameter type "
@@ -568,7 +568,7 @@
def warn_non_contravariant_param_types : Warning<
"conflicting parameter types in "
"implementation of %0: %1 vs %2">,
- InGroup<DiagGroup<"method-signatures">>, DefaultIgnore;
+ InGroup<MethodSignatures>, DefaultIgnore;
def warn_conflicting_overriding_variadic :Warning<
"conflicting variadic declaration of method and its "
@@ -1983,16 +1983,16 @@
def warn_impcast_vector_scalar : Warning<
"implicit conversion turns vector to scalar: %0 to %1">,
- InGroup<DiagGroup<"conversion">>, DefaultIgnore;
+ InGroup<Conversion>, DefaultIgnore;
def warn_impcast_complex_scalar : Warning<
"implicit conversion discards imaginary component: %0 to %1">,
- InGroup<DiagGroup<"conversion">>, DefaultIgnore;
+ InGroup<Conversion>, DefaultIgnore;
def warn_impcast_float_precision : Warning<
"implicit conversion loses floating-point precision: %0 to %1">,
- InGroup<DiagGroup<"conversion">>, DefaultIgnore;
+ InGroup<Conversion>, DefaultIgnore;
def warn_impcast_float_integer : Warning<
"implicit conversion turns floating-point number into integer: %0 to %1">,
- InGroup<DiagGroup<"conversion">>, DefaultIgnore;
+ InGroup<Conversion>, DefaultIgnore;
def warn_impcast_integer_sign : Warning<
"implicit conversion changes signedness: %0 to %1">,
InGroup<SignConversion>, DefaultIgnore;
@@ -2001,7 +2001,7 @@
InGroup<SignConversion>, DefaultIgnore;
def warn_impcast_integer_precision : Warning<
"implicit conversion loses integer precision: %0 to %1">,
- InGroup<DiagGroup<"conversion">>, DefaultIgnore;
+ InGroup<Conversion>, DefaultIgnore;
def warn_impcast_integer_64_32 : Warning<
"implicit conversion loses integer precision: %0 to %1">,
InGroup<Shorten64To32>, DefaultIgnore;
@@ -3239,10 +3239,10 @@
def warn_internal_in_extern_inline : ExtWarn<
"static %select{function|variable}0 %1 is used in an inline function with "
- "external linkage">, InGroup<DiagGroup<"static-in-inline"> >;
+ "external linkage">, InGroup<StaticInInline>;
def ext_internal_in_extern_inline : Extension<
"static %select{function|variable}0 %1 is used in an inline function with "
- "external linkage">, InGroup<DiagGroup<"static-in-inline"> >;
+ "external linkage">, InGroup<StaticInInline>;
def note_convert_inline_to_static : Note<
"use 'static' to give inline function %0 internal linkage">;
def note_internal_decl_declared_here : Note<
@@ -3348,7 +3348,7 @@
"array is too large (%0 elements)">;
def warn_array_new_too_large : Warning<"array is too large (%0 elements)">,
// FIXME PR11644: ", will throw std::bad_array_new_length at runtime"
- InGroup<DiagGroup<"bad-array-new-length">>;
+ InGroup<BadArrayNewLength>;
// -Wpadded, -Wpacked
def warn_padded_struct_field : Warning<
@@ -3368,7 +3368,7 @@
def err_typecheck_negative_array_size : Error<"array size is negative">;
def warn_typecheck_negative_array_new_size : Warning<"array size is negative">,
// FIXME PR11644: ", will throw std::bad_array_new_length at runtime"
- InGroup<DiagGroup<"bad-array-new-length">>;
+ InGroup<BadArrayNewLength>;
def warn_typecheck_function_qualifiers : Warning<
"qualifier on function type %0 has unspecified behavior">;
def err_typecheck_invalid_restrict_not_pointer : Error<
@@ -3383,7 +3383,7 @@
"zero-length arrays are not permitted in C++">;
def warn_typecheck_zero_static_array_size : Warning<
"'static' has no effect on zero-length arrays">,
- InGroup<DiagGroup<"array-bounds">>;
+ InGroup<ArrayBounds>;
def err_array_size_non_int : Error<"size of array has non-integer type %0">;
def err_init_element_not_constant : Error<
"initializer element is not a compile-time constant">;
@@ -4116,7 +4116,7 @@
def warn_pointer_indirection_from_incompatible_type : Warning<
"dereference of type %1 that was reinterpret_cast from type %0 has undefined "
"behavior">,
- InGroup<DiagGroup<"undefined-reinterpret-cast">>, DefaultIgnore;
+ InGroup<UndefinedReinterpretCast>, DefaultIgnore;
def err_objc_object_assignment : Error<
"cannot assign to class object (%0 invalid)">;
@@ -4173,11 +4173,11 @@
InGroup<DiagGroup<"enum-compare">>;
def warn_null_in_arithmetic_operation : Warning<
"use of NULL in arithmetic operation">,
- InGroup<DiagGroup<"null-arithmetic">>;
+ InGroup<NullArithmetic>;
def warn_null_in_comparison_operation : Warning<
"comparison between NULL and non-pointer "
"%select{(%1 and NULL)|(NULL and %1)}0">,
- InGroup<DiagGroup<"null-arithmetic">>;
+ InGroup<NullArithmetic>;
def err_invalid_this_use : Error<
"invalid use of 'this' outside of a non-static member function">;
@@ -4435,7 +4435,7 @@
"reinterpret_cast of a %0 to %1 needs its address which is not allowed">;
def warn_undefined_reinterpret_cast : Warning<
"reinterpret_cast from %0 to %1 has undefined behavior">,
- InGroup<DiagGroup<"undefined-reinterpret-cast">>, DefaultIgnore;
+ InGroup<UndefinedReinterpretCast>, DefaultIgnore;
// These messages don't adhere to the pattern.
// FIXME: Display the path somehow better.
@@ -5067,7 +5067,7 @@
def warn_non_pod_vararg_with_format_string : Warning<
"cannot pass %select{non-POD|non-trivial}0 object of type %1 to variadic "
"%select{function|block|method|constructor}2; expected type from format "
- "string was %3">, InGroup<DiagGroup<"non-pod-varargs">>, DefaultError;
+ "string was %3">, InGroup<NonPODVarargs>, DefaultError;
// The arguments to this diagnostic should match the warning above.
def err_cannot_pass_objc_interface_to_vararg_format : Error<
"cannot pass object with interface type %1 by value to variadic "
@@ -5080,7 +5080,7 @@
def warn_cannot_pass_non_pod_arg_to_vararg : Warning<
"cannot pass object of %select{non-POD|non-trivial}0 type %1 through variadic"
" %select{function|block|method|constructor}2; call will abort at runtime">,
- InGroup<DiagGroup<"non-pod-varargs">>, DefaultError;
+ InGroup<NonPODVarargs>, DefaultError;
def warn_cxx98_compat_pass_non_pod_arg_to_vararg : Warning<
"passing object of trivial but non-POD type %0 through variadic"
" %select{function|block|method|constructor}1 is incompatible with C++98">,
@@ -5500,17 +5500,17 @@
def warn_ptr_arith_precedes_bounds : Warning<
"the pointer decremented by %0 refers before the beginning of the array">,
- InGroup<DiagGroup<"array-bounds-pointer-arithmetic">>, DefaultIgnore;
+ InGroup<ArrayBoundsPointerArithmetic>, DefaultIgnore;
def warn_ptr_arith_exceeds_bounds : Warning<
"the pointer incremented by %0 refers past the end of the array (that "
"contains %1 element%s2)">,
- InGroup<DiagGroup<"array-bounds-pointer-arithmetic">>, DefaultIgnore;
+ InGroup<ArrayBoundsPointerArithmetic>, DefaultIgnore;
def warn_array_index_precedes_bounds : Warning<
"array index %0 is before the beginning of the array">,
- InGroup<DiagGroup<"array-bounds">>;
+ InGroup<ArrayBounds>;
def warn_array_index_exceeds_bounds : Warning<
"array index %0 is past the end of the array (which contains %1 "
- "element%s2)">, InGroup<DiagGroup<"array-bounds">>;
+ "element%s2)">, InGroup<ArrayBounds>;
def note_array_index_out_of_bounds : Note<
"array %0 declared here">;
@@ -5548,7 +5548,7 @@
InGroup<Format>;
def warn_static_array_too_small : Warning<
"array argument is too small; contains %0 elements, callee requires at least %1">,
- InGroup<DiagGroup<"array-bounds">>;
+ InGroup<ArrayBounds>;
def note_callee_static_array : Note<
"callee declares array parameter as static here">;
def warn_empty_format_string : Warning<
@@ -5597,19 +5597,19 @@
// CHECK: returning address/reference of stack memory
def warn_ret_stack_addr : Warning<
"address of stack memory associated with local variable %0 returned">,
- InGroup<DiagGroup<"return-stack-address">>;
+ InGroup<ReturnStackAddress>;
def warn_ret_stack_ref : Warning<
"reference to stack memory associated with local variable %0 returned">,
- InGroup<DiagGroup<"return-stack-address">>;
+ InGroup<ReturnStackAddress>;
def warn_ret_local_temp_addr : Warning<
"returning address of local temporary object">,
- InGroup<DiagGroup<"return-stack-address">>;
+ InGroup<ReturnStackAddress>;
def warn_ret_local_temp_ref : Warning<
"returning reference to local temporary object">,
- InGroup<DiagGroup<"return-stack-address">>;
+ InGroup<ReturnStackAddress>;
def warn_ret_addr_label : Warning<
"returning address of label, which is local">,
- InGroup<DiagGroup<"return-stack-address">>;
+ InGroup<ReturnStackAddress>;
def err_ret_local_block : Error<
"returning block that lives on the local stack">;
def note_ref_var_local_bind : Note<
@@ -5619,13 +5619,13 @@
// a constructor parameter.
def warn_bind_ref_member_to_parameter : Warning<
"binding reference member %0 to stack allocated parameter %1">,
- InGroup<DiagGroup<"dangling-field">>;
+ InGroup<DanglingField>;
def warn_init_ptr_member_to_parameter_addr : Warning<
"initializing pointer member %0 with the stack address of parameter %1">,
- InGroup<DiagGroup<"dangling-field">>;
+ InGroup<DanglingField>;
def warn_bind_ref_member_to_temporary : Warning<
"binding reference member %0 to a temporary value">,
- InGroup<DiagGroup<"dangling-field">>;
+ InGroup<DanglingField>;
def note_ref_or_ptr_member_declared_here : Note<
"%select{reference|pointer}0 member declared here">;
@@ -5711,7 +5711,7 @@
"switch condition has boolean value">;
def warn_case_value_overflow : Warning<
"overflow converting case value to switch condition type (%0 to %1)">,
- InGroup<DiagGroup<"switch">>;
+ InGroup<Switch>;
def err_duplicate_case : Error<"duplicate case value '%0'">;
def err_duplicate_case_differing_expr : Error<
"duplicate case value: '%0' and '%1' both equal '%2'">;
@@ -5814,10 +5814,10 @@
"second argument to 'va_arg' is of abstract type %0">;
def warn_second_parameter_to_va_arg_not_pod : Warning<
"second argument to 'va_arg' is of non-POD type %0">,
- InGroup<DiagGroup<"non-pod-varargs">>, DefaultError;
+ InGroup<NonPODVarargs>, DefaultError;
def warn_second_parameter_to_va_arg_ownership_qualified : Warning<
"second argument to 'va_arg' is of ARC ownership-qualified type %0">,
- InGroup<DiagGroup<"non-pod-varargs">>, DefaultError;
+ InGroup<NonPODVarargs>, DefaultError;
def warn_second_parameter_to_va_arg_never_compatible : Warning<
"second argument to 'va_arg' is of promotable type %0; this va_arg has "
"undefined behavior because arguments will be promoted to %1">;
@@ -5839,10 +5839,10 @@
"must not return a value">;
def warn_noreturn_function_has_return_expr : Warning<
"function %0 declared 'noreturn' should not return">,
- InGroup<DiagGroup<"invalid-noreturn">>;
+ InGroup<InvalidNoreturn>;
def warn_falloff_noreturn_function : Warning<
"function declared 'noreturn' should not return">,
- InGroup<DiagGroup<"invalid-noreturn">>;
+ InGroup<InvalidNoreturn>;
def err_noreturn_block_has_return_expr : Error<
"block declared 'noreturn' should not return">;
def err_block_on_nonlocal : Error<
More information about the cfe-commits
mailing list