Author: rtrieu
Date: Fri Jun 17 15:35:48 2011
New Revision: 133287

URL: http://llvm.org/viewvc/llvm-project?rev=133287&view=rev
Log:
Put the new warning from revision 133196 on NULL arithmetic behind the flag 
-Wnull-arthimetic and set to DefaultIgnore.  A few edge cases need to be worked 
out before this can be set to default.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/test/SemaCXX/null_in_arithmetic_ops.cpp
    cfe/trunk/test/SemaObjCXX/null_objc_pointer.mm

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=133287&r1=133286&r2=133287&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Fri Jun 17 15:35:48 
2011
@@ -2998,7 +2998,8 @@
   "comparison of two values with different enumeration types (%0 and %1)">,
   InGroup<DiagGroup<"enum-compare">>;
 def warn_null_in_arithmetic_operation : Warning<
-  "use of NULL in arithmetic operation">;
+  "use of NULL in arithmetic operation">,
+  InGroup<DiagGroup<"null-arithmetic">>, DefaultIgnore;
 
 def err_invalid_this_use : Error<
   "invalid use of 'this' outside of a nonstatic member function">;

Modified: cfe/trunk/test/SemaCXX/null_in_arithmetic_ops.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/null_in_arithmetic_ops.cpp?rev=133287&r1=133286&r2=133287&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/null_in_arithmetic_ops.cpp (original)
+++ cfe/trunk/test/SemaCXX/null_in_arithmetic_ops.cpp Fri Jun 17 15:35:48 2011
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fblocks -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fblocks -Wnull-arithmetic -verify %s
 #include <stddef.h>
 
 void f() {

Modified: cfe/trunk/test/SemaObjCXX/null_objc_pointer.mm
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/null_objc_pointer.mm?rev=133287&r1=133286&r2=133287&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjCXX/null_objc_pointer.mm (original)
+++ cfe/trunk/test/SemaObjCXX/null_objc_pointer.mm Fri Jun 17 15:35:48 2011
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wnull-arithmetic %s
 #define NULL __null
 
 @interface X


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to