[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
Loading
Please register or sign in to comment