]> granicus.if.org Git - clang/commitdiff
Add DiagGroups to a couple of warnings.
authorMatt Beaumont-Gay <matthewbg@google.com>
Fri, 23 Sep 2011 20:56:58 +0000 (20:56 +0000)
committerMatt Beaumont-Gay <matthewbg@google.com>
Fri, 23 Sep 2011 20:56:58 +0000 (20:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140411 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
test/Misc/warning-flags.c

index 509f29e1a5b048fccab537d5e9a5fd93650e1043..16afc978bc0b1c723fd0cac0fea90325277e6c7d 100644 (file)
@@ -66,6 +66,7 @@ def BitwiseOpParentheses: DiagGroup<"bitwise-op-parentheses">;
 def LogicalOpParentheses: DiagGroup<"logical-op-parentheses">;
 def IgnoredQualifiers : DiagGroup<"ignored-qualifiers">;
 def : DiagGroup<"import">;
+def IncompatiblePointerTypes : DiagGroup<"incompatible-pointer-types">;
 def : DiagGroup<"init-self">;
 def : DiagGroup<"inline">;
 def : DiagGroup<"int-to-pointer-cast">;
index b0f6c938f832e2870ad0dd72b542e8d3e05ebe2a..0dd84d221dc73062b1e8136bc56451f6ff7fa165 100644 (file)
@@ -3785,19 +3785,21 @@ def ext_typecheck_convert_incompatible_pointer : ExtWarn<
   "take the address with &|"
   "remove *|"
   "remove &}3">,
-  InGroup<DiagGroup<"incompatible-pointer-types">>;
+  InGroup<IncompatiblePointerTypes>;
 def ext_typecheck_convert_discards_qualifiers : ExtWarn<
   "%select{assigning to|passing|returning|converting|initializing|sending|casting}2"
   " %0 "
   "%select{from|to parameter of type|from a function with result type|to type|"
   "with an expression of type|to parameter of type|to type}2 %1 discards "
-  "qualifiers">;
+  "qualifiers">,
+  InGroup<IncompatiblePointerTypes>;
 def ext_nested_pointer_qualifier_mismatch : ExtWarn<
   "%select{assigning to|passing|returning|converting|initializing|sending|casting}2"
   " %0 "
   "%select{from|to parameter of type|from a function with result type|to type|"
   "with an expression of type|to parameter of type|to type}2 %1 discards "
-  "qualifiers in nested pointer types">;
+  "qualifiers in nested pointer types">,
+  InGroup<IncompatiblePointerTypes>;
 def warn_incompatible_vectors : Warning<
   "incompatible vector types "
   "%select{assigning to|passing|returning|converting|initializing|sending|casting}2"
@@ -3941,9 +3943,11 @@ def ext_typecheck_cond_incompatible_operands_nonstandard : ExtWarn<
 def err_cast_selector_expr : Error<
   "cannot type cast @selector expression">;
 def warn_typecheck_cond_incompatible_pointers : ExtWarn<
-  "pointer type mismatch (%0 and %1)">;
+  "pointer type mismatch (%0 and %1)">,
+  InGroup<DiagGroup<"pointer-type-mismatch">>;
 def warn_typecheck_cond_pointer_integer_mismatch : ExtWarn<
-  "pointer/integer type mismatch in conditional expression (%0 and %1)">;
+  "pointer/integer type mismatch in conditional expression (%0 and %1)">,
+  InGroup<DiagGroup<"conditional-type-mismatch">>;
 def err_typecheck_choose_expr_requires_constant : Error<
   "'__builtin_choose_expr' requires a constant expression">;
 def ext_typecheck_expression_not_constant_but_accepted : Extension<
index 5b6bac49e6740549a7f286765f2226d783e6291d..447b8ef02a8bce8c209e5b907461019d1297292f 100644 (file)
@@ -17,7 +17,7 @@ This test serves two purposes:
 
 The list of warnings below should NEVER grow.  It should gradually shrink to 0.
 
-CHECK: Warnings without flags (310):
+CHECK: Warnings without flags (306):
 CHECK-NEXT:   backslash_newline_space
 CHECK-NEXT:   charize_microsoft_ext
 CHECK-NEXT:   ext_anon_param_requires_type_specifier
@@ -68,7 +68,6 @@ CHECK-NEXT:   ext_invalid_sign_spec
 CHECK-NEXT:   ext_missing_declspec
 CHECK-NEXT:   ext_missing_varargs_arg
 CHECK-NEXT:   ext_missing_whitespace_after_macro_name
-CHECK-NEXT:   ext_nested_pointer_qualifier_mismatch
 CHECK-NEXT:   ext_new_paren_array_nonconst
 CHECK-NEXT:   ext_nonstandard_escape
 CHECK-NEXT:   ext_offsetof_extended_field_designator
@@ -101,7 +100,6 @@ CHECK-NEXT:   ext_typecheck_comparison_of_pointer_integer
 CHECK-NEXT:   ext_typecheck_cond_incompatible_operands
 CHECK-NEXT:   ext_typecheck_cond_incompatible_operands_nonstandard
 CHECK-NEXT:   ext_typecheck_cond_one_void
-CHECK-NEXT:   ext_typecheck_convert_discards_qualifiers
 CHECK-NEXT:   ext_typecheck_convert_int_pointer
 CHECK-NEXT:   ext_typecheck_convert_pointer_int
 CHECK-NEXT:   ext_typecheck_convert_pointer_void_func
@@ -310,8 +308,6 @@ CHECK-NEXT:   warn_transparent_union_attribute_floating
 CHECK-NEXT:   warn_transparent_union_attribute_not_definition
 CHECK-NEXT:   warn_transparent_union_attribute_zero_fields
 CHECK-NEXT:   warn_transparent_union_nonpointer
-CHECK-NEXT:   warn_typecheck_cond_incompatible_pointers
-CHECK-NEXT:   warn_typecheck_cond_pointer_integer_mismatch
 CHECK-NEXT:   warn_typecheck_function_qualifiers
 CHECK-NEXT:   warn_ucn_escape_too_large
 CHECK-NEXT:   warn_ucn_not_valid_in_c89