llvm-project/clang
Mark de Wever 9658d895c8 [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
2020-02-16 15:38:25 +01:00
..
INPUTS
bindings
cmake [CMake][Fuchsia] Enable in-process cc1 2020-02-12 14:05:24 -08:00
docs [Sema] Adds the pointer-to-int-cast diagnostic 2020-02-16 15:38:25 +01:00
examples Update clang-interpreter example to incorporate changes in ce2207abaf. 2020-01-21 22:00:50 -08:00
include [Sema] Adds the pointer-to-int-cast diagnostic 2020-02-16 15:38:25 +01:00
lib [Sema] Adds the pointer-to-int-cast diagnostic 2020-02-16 15:38:25 +01:00
runtime
test [Sema] Adds the pointer-to-int-cast diagnostic 2020-02-16 15:38:25 +01:00
tools [MC] De-capitalize MCStreamer::Emit{Bundle,Addrsig}* etc 2020-02-15 09:11:48 -08:00
unittests [clang][Index] Introduce a TemplateParm SymbolKind 2020-02-14 13:20:34 +01:00
utils [FIX] Remove pointer in attribute to eliminate leaks (see D71830) 2020-02-15 18:09:54 -06:00
www [cxx_status] New papers from Prague 2020 WG21 meeting. 2020-02-15 02:16:21 -08:00
.arcconfig
.clang-format
.clang-tidy - Update .clang-tidy to ignore parameters of main like functions for naming violations in clang and llvm directory 2020-01-31 16:49:45 +00:00
.gitignore
CMakeLists.txt Fix standalone build interaction with compiler extension 2020-02-15 11:10:51 +01:00
CODE_OWNERS.TXT
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang development mailing list:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/