llvm-project/clang
Richard Smith d0b4dd656d constexpr handling improvements. Produce detailed diagnostics when a 'constexpr'
variable is initialized by a non-constant expression, and pass in the variable
being declared so that earlier-initialized fields' values can be used.

Rearrange VarDecl init evaluation to make this possible, and in so doing fix a
long-standing issue in our C++ constant expression handling, where we would
mishandle cases like:

  extern const int a;
  const int n = a;
  const int a = 5;
  int arr[n];

Here, n is not initialized by a constant expression, so can't be used in an ICE,
even though the initialization expression would be an ICE if it appeared later
in the TU. This requires computing whether the initializer is an ICE eagerly,
and saving that information in PCH files.

llvm-svn: 146856
2011-12-19 06:19:21 +00:00
..
INPUTS Enhance the CFG construction to detect no-return destructors for 2011-09-13 06:09:01 +00:00
bindings/python cindex.py: Remove more ternary operator + whitespace fixes 2011-10-31 02:06:50 +00:00
docs clarify that clang version number macros are marketing version #'s, not something useful. 2011-12-15 19:06:36 +00:00
examples examples: flesh out PFN readme 2011-12-18 11:30:53 +00:00
include constexpr handling improvements. Produce detailed diagnostics when a 'constexpr' 2011-12-19 06:19:21 +00:00
lib constexpr handling improvements. Produce detailed diagnostics when a 'constexpr' 2011-12-19 06:19:21 +00:00
runtime runtime/Linux: Include the profile and ASAN libs on x86. 2011-12-07 19:35:10 +00:00
test constexpr handling improvements. Produce detailed diagnostics when a 'constexpr' 2011-12-19 06:19:21 +00:00
tools Keep track of all declarations of an Objective-C class (both forward 2011-12-15 20:29:51 +00:00
unittests C++11 constexpr: Add note stacks containing backtraces if constant evaluation 2011-12-16 19:06:07 +00:00
utils Add support for pretty-printing attributes, from Richard Membarth! 2011-11-19 19:22:57 +00:00
www [analyzer] More www; document ProgramState->dump(). 2011-12-07 19:04:27 +00:00
.gitignore Revert "Test commit" 2011-10-24 10:03:25 +00:00
CMakeLists.txt Add the Clang tblgen backends to Clang, and flip the switch to cause 2011-10-06 13:03:08 +00:00
INSTALL.txt
LICENSE.TXT
Makefile Add the Clang tblgen backends to Clang, and flip the switch to cause 2011-10-06 13:03:08 +00:00
ModuleInfo.txt
NOTES.txt Make a note about a missing optimization. 2011-07-28 07:41:22 +00:00
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.cs.uiuc.edu/mailman/listinfo/cfe-dev

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