diff options
author | Jamie Schmeiser <schmeise@ca.ibm.com> | 2021-05-11 11:29:50 -0400 |
---|---|---|
committer | Jamie Schmeiser <schmeise@ca.ibm.com> | 2021-05-11 11:29:50 -0400 |
commit | dfc1e31d49fe1380c9bab43373995df5fed15e6d (patch) | |
tree | c2699bfdc8e25bfdfbdbe9de1d5eb636f7822446 /llvm/lib/TextAPI/Platform.cpp | |
parent | 4eff9469475384a59a9da407e78aa00262edcdd0 (diff) | |
download | llvm-dfc1e31d49fe1380c9bab43373995df5fed15e6d.zip llvm-dfc1e31d49fe1380c9bab43373995df5fed15e6d.tar.gz llvm-dfc1e31d49fe1380c9bab43373995df5fed15e6d.tar.bz2 |
Produce warning for performing pointer arithmetic on a null pointer.
Summary:
Test and produce warning for subtracting a pointer from null or subtracting
null from a pointer. Reuse existing warning that this is undefined
behaviour. Also add unit test for both warnings.
Reformat to satisfy clang-format.
Respond to review comments: add additional test.
Respond to review comments: Do not issue warning for nullptr - nullptr
in C++.
Fix indenting to satisfy clang-format.
Respond to review comments: Add C++ tests.
Author: Jamie Schmeiser <schmeise@ca.ibm.com>
Reviewed By: efriedma (Eli Friedman), nickdesaulniers (Nick Desaulniers)
Differential Revision: https://reviews.llvm.org/D98798
Diffstat (limited to 'llvm/lib/TextAPI/Platform.cpp')
0 files changed, 0 insertions, 0 deletions