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.

llvm-svn: 133287
This commit is contained in:
Richard Trieu 2011-06-17 20:35:48 +00:00
parent e303114b3c
commit fc51bc1cea
3 changed files with 4 additions and 3 deletions

View File

@ -2998,7 +2998,8 @@ def warn_comparison_of_mixed_enum_types : Warning<
"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">;

View File

@ -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() {

View File

@ -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