[cfe-commits] r140411 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td test/Misc/warning-flags.c
Matt Beaumont-Gay
matthewbg at google.com
Fri Sep 23 13:56:58 PDT 2011
Author: matthewbg
Date: Fri Sep 23 15:56:58 2011
New Revision: 140411
URL: http://llvm.org/viewvc/llvm-project?rev=140411&view=rev
Log:
Add DiagGroups to a couple of warnings.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticGroups.td
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/test/Misc/warning-flags.c
Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=140411&r1=140410&r2=140411&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Fri Sep 23 15:56:58 2011
@@ -66,6 +66,7 @@
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">;
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=140411&r1=140410&r2=140411&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Fri Sep 23 15:56:58 2011
@@ -3785,19 +3785,21 @@
"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 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<
Modified: cfe/trunk/test/Misc/warning-flags.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/warning-flags.c?rev=140411&r1=140410&r2=140411&view=diff
==============================================================================
--- cfe/trunk/test/Misc/warning-flags.c (original)
+++ cfe/trunk/test/Misc/warning-flags.c Fri Sep 23 15:56:58 2011
@@ -17,7 +17,7 @@
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_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_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_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
More information about the cfe-commits
mailing list