History log of /external/clang/test/SemaCXX/constexpr-depth.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
099e7f647ccda915513f2b2ec53352dc756082d3 19-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/constexpr-depth.cpp
c18c42345636e2866fed75c7e434fb659d747672 21-Nov-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add driver arguments -ftemplate-depth=N and -fconstexpr-depth=N, with the same
semantics and defaults as the corresponding g++ arguments. The historical g++
argument -ftemplate-depth-N is kept for compatibility, but modern g++ versions
no longer document that option.

Add -cc1 argument -fconstexpr-depth N to implement the corresponding
functionality.

The -ftemplate-depth=N part of this fixes PR9890.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/constexpr-depth.cpp