aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorMark de Wever <koraq@xs4all.nl>2020-02-16 15:01:25 +0100
committerMark de Wever <koraq@xs4all.nl>2020-02-16 15:38:25 +0100
commit9658d895c81aeb849b412b9332c88769588c7660 (patch)
tree5ff3667dba4a4019c6ce586894095ce80984d6a2 /clang/lib/CodeGen/CodeGenFunction.cpp
parent1b04866a3db9f816a559860f941da067fe1eccf1 (diff)
downloadllvm-9658d895c81aeb849b412b9332c88769588c7660.zip
llvm-9658d895c81aeb849b412b9332c88769588c7660.tar.gz
llvm-9658d895c81aeb849b412b9332c88769588c7660.tar.bz2
[Sema] Adds the pointer-to-int-cast diagnostic
Converting a pointer to an integer whose result cannot represented in the integer type is undefined behavior is C and prohibited in C++. C++ already has a diagnostic when casting. This adds a diagnostic for C. Since this diagnostic uses the range of the conversion it also modifies int-to-pointer-cast diagnostic to use a range. Fixes PR8718: No warning on casting between pointer and non-pointer-sized int Differential Revision: https://reviews.llvm.org/D72231
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions