]> granicus.if.org Git - clang/commit
Add a new warning when a NULL constant is used in arithmetic operations. The warning...
authorRichard Trieu <rtrieu@google.com>
Thu, 16 Jun 2011 21:36:56 +0000 (21:36 +0000)
committerRichard Trieu <rtrieu@google.com>
Thu, 16 Jun 2011 21:36:56 +0000 (21:36 +0000)
commit3e95ba94fd34c5f6420c57d7732f601875074681
treef9d91882f472c5ab6fc330c73d0819f5e98ed7f9
parenta92d7e7a55a35b28437103130904a6401bf35408
Add a new warning when a NULL constant is used in arithmetic operations.  The warning will fire on cases such as:

int x = 1 + NULL;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133196 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaExpr.cpp
test/SemaCXX/null_in_arithmetic_ops.cpp [new file with mode: 0644]
test/SemaCXX/nullptr_in_arithmetic_ops.cpp [new file with mode: 0644]
test/SemaObjCXX/null_objc_pointer.mm [new file with mode: 0644]