summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/nullptr_in_arithmetic_ops.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Add test cases for false positives on -Wnull-arithmetic from RichardChandler Carruth2011-06-191-3/+11
| | | | | | | | | | | | | Trieu, and fix them by checking for array and function types as well as pointer types. I've added a predicate method on Type to bundle together the logic we're using here: isPointerLikeType(). I'd welcome better names for this predicate, this is the best I came up with. It's implemented as a switch to be a touch lighter weight than all the chained isa<...> casts that would result otherwise. llvm-svn: 133383
* Add a new warning when a NULL constant is used in arithmetic operations. ↵Richard Trieu2011-06-161-0/+65
The warning will fire on cases such as: int x = 1 + NULL; llvm-svn: 133196
OpenPOWER on IntegriCloud