[cfe-commits] r151934 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td test/Misc/serialized-diags.c test/Misc/warning-flags.c
Nico Weber
nicolasweber at gmx.de
Fri Mar 2 12:23:08 PST 2012
Author: nico
Date: Fri Mar 2 14:23:08 2012
New Revision: 151934
URL: http://llvm.org/viewvc/llvm-project?rev=151934&view=rev
Log:
Move int<->pointer conversion warnings behind -Wint-conversions.
This is consistent with -Wbool-conversion. Let me know if you prefer
a different flag name.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticGroups.td
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/test/Misc/serialized-diags.c
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=151934&r1=151933&r2=151934&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Fri Mar 2 14:23:08 2012
@@ -27,6 +27,7 @@
def Availability : DiagGroup<"availability">;
def AutoImport : DiagGroup<"auto-import">;
def BoolConversions : DiagGroup<"bool-conversions">;
+def IntConversions : DiagGroup<"int-conversions">;
def BuiltinRequiresHeader : DiagGroup<"builtin-requires-header">;
def CXXCompat: DiagGroup<"c++-compat">;
def CastAlign : DiagGroup<"cast-align">;
@@ -278,7 +279,8 @@
DiagGroup<"literal-conversion">,
DiagGroup<"string-conversion">,
DiagGroup<"sign-conversion">,
- BoolConversions]>,
+ BoolConversions,
+ IntConversions]>,
DiagCategory<"Value Conversion Issue">;
def Unused : DiagGroup<"unused",
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=151934&r1=151933&r2=151934&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Fri Mar 2 14:23:08 2012
@@ -4201,7 +4201,8 @@
"%select{|dereference with *|"
"take the address with &|"
"remove *|"
- "remove &}3">;
+ "remove &}3">,
+ InGroup<IntConversions>;
def ext_typecheck_convert_int_pointer : ExtWarn<
"incompatible integer to pointer conversion "
"%select{assigning to|passing|returning|converting|initializing|sending|casting}2"
@@ -4211,7 +4212,8 @@
"%select{|dereference with *|"
"take the address with &|"
"remove *|"
- "remove &}3">;
+ "remove &}3">,
+ InGroup<IntConversions>;
def ext_typecheck_convert_pointer_void_func : Extension<
"%select{assigning to|passing|returning|converting|initializing|sending|casting}2"
" %0 "
Modified: cfe/trunk/test/Misc/serialized-diags.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/serialized-diags.c?rev=151934&r1=151933&r2=151934&view=diff
==============================================================================
--- cfe/trunk/test/Misc/serialized-diags.c (original)
+++ cfe/trunk/test/Misc/serialized-diags.c Fri Mar 2 14:23:08 2012
@@ -52,7 +52,7 @@
// CHECK: +-Range: {{.*[/\\]}}serialized-diags.c:22:3 {{.*[/\\]}}serialized-diags.c:22:6
// CHECK: +-Range: {{.*[/\\]}}serialized-diags.c:20:15 {{.*[/\\]}}serialized-diags.c:20:16
// CHECK: +-{{.*[/\\]}}serialized-diags.c:19:1: note: 'taz' declared here []
-// CHECK: {{.*[/\\]}}serialized-diags.h:5:7: warning: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int'; []
+// CHECK: {{.*[/\\]}}serialized-diags.h:5:7: warning: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int'; [-Wint-conversions]
// CHECK: Range: {{.*[/\\]}}serialized-diags.h:5:16 {{.*[/\\]}}serialized-diags.h:5:17
// CHECK: +-{{.*[/\\]}}serialized-diags.c:26:10: note: in file included from {{.*[/\\]}}serialized-diags.c:26: []
// CHECK: Number of diagnostics: 5
Modified: cfe/trunk/test/Misc/warning-flags.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/warning-flags.c?rev=151934&r1=151933&r2=151934&view=diff
==============================================================================
--- cfe/trunk/test/Misc/warning-flags.c (original)
+++ cfe/trunk/test/Misc/warning-flags.c Fri Mar 2 14:23:08 2012
@@ -17,7 +17,7 @@
The list of warnings below should NEVER grow. It should gradually shrink to 0.
-CHECK: Warnings without flags (256):
+CHECK: Warnings without flags (254):
CHECK-NEXT: ext_anonymous_struct_union_qualified
CHECK-NEXT: ext_binary_literal
CHECK-NEXT: ext_cast_fn_obj
@@ -77,8 +77,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_int_pointer
-CHECK-NEXT: ext_typecheck_convert_pointer_int
CHECK-NEXT: ext_typecheck_convert_pointer_void_func
CHECK-NEXT: ext_typecheck_ordered_comparison_of_function_pointers
CHECK-NEXT: ext_typecheck_ordered_comparison_of_pointer_and_zero
More information about the cfe-commits
mailing list