summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/expr/expr.const/p2-0x.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* constexpr: perform zero-initialization prior to / instead of performing aRichard Smith2011-12-251-2/+2
| | | | | | constructor call when appropriate. Thanks to Eli for spotting this. llvm-svn: 147271
* constexpr: diagnostic improvements for invalid lvalue-to-rvalue conversions inRichard Smith2011-12-211-20/+43
| | | | | | constant expressions. llvm-svn: 147035
* constexpr handling improvements. Produce detailed diagnostics when a 'constexpr'Richard Smith2011-12-191-5/+5
| | | | | | | | | | | | | | | | | | | | | 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
* Reduce recursion limit on this test further to try to make the msys bot green.Richard Smith2011-12-161-3/+3
| | | | llvm-svn: 146759
* C++11 constexpr: Add note stacks containing backtraces if constant evaluationRichard Smith2011-12-161-9/+9
| | | | | | | | | | fails within a call to a constexpr function. Add -fconstexpr-backtrace-limit argument to driver and frontend, to control the maximum number of notes so produced (default 10). Fix APValue printing to be able to pretty-print all APValue types, and move the testing for this functionality from a unittest to a -verify test now that it's visible in clang's output. llvm-svn: 146749
* Halve the constexpr recursion depth in this test in an attempt to make theRichard Smith2011-12-141-3/+3
| | | | | | | | freebsd bots happy. In the longer term, we should have a mechanism for moving constexpr recursion off the call stack, to support the default limit of 512 suggested by the standard. llvm-svn: 146596
* Add checks and diagnostics for many of the cases which C++11 considers to notRichard Smith2011-12-131-1/+354
| | | | | | be constant expressions. llvm-svn: 146479
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Implement the initial part of C++0x [expr.const]p2, which specifiesDouglas Gregor2011-05-241-0/+25
that the unevaluated subexpressions of &&, ||, and ? : are not considered when determining whether the expression is a constant expression. Also, turn the "used in its own initializer" warning into a runtime-behavior warning, so that it doesn't fire when a variable is used as part of an unevaluated subexpression of its own initializer. Fixes PR9999. llvm-svn: 131968
OpenPOWER on IntegriCloud