summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/constexpr-printing.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add triples to these tests to keep them working on Windows,Richard Smith2012-04-051-1/+1
| | | | | | where wchar_t is only 16 bits wide. llvm-svn: 154072
* Fix assertions and wrong output from StmtPrinter's string literal printing.Richard Smith2012-04-051-2/+2
| | | | | | | | | | String literals (including unicode ones) can contain non-Unicode codepoints if they were written using \x or similar. Write those out using \x, but be careful that the following character can't be misinterpreted as part of the \x escape sequence. Convert UTF-16 surrogate pairs back to codepoints before rendering them. llvm-svn: 154069
* Teach APValue printer to print boolean 0 and 1 as 'false' and 'true'. Fix upRichard Smith2012-03-231-0/+4
| | | | | | some calling code to actually pass in a non-null type, to avoid a crash. llvm-svn: 153358
* Address Richard's review comments on r147561 (Evaluate support for ↵Eli Friedman2012-01-051-0/+7
| | | | | | address-of-label differences). llvm-svn: 147631
* Add assertion to char32_t that the value is valid, as suggested by Jordy Rose.Richard Smith2012-01-021-2/+4
| | | | | | | Add a test that such characters don't make it through to StringLiteral objects in error recovery. llvm-svn: 147438
* Fix crash when trying to pretty-print unicode or wide string literals.Richard Smith2011-12-301-0/+14
| | | | llvm-svn: 147385
* Unrevert r147271, reverted in r147361.Richard Smith2011-12-301-2/+5
| | | | | | | | | | | | Also temporarily remove the assumption from IR gen that we can emit IR for every constant we can fold, since it isn't currently true in C++11, to fix PR11676. Original comment from r147271: constexpr: perform zero-initialization prior to / instead of performing a constructor call when appropriate. Thanks to Eli for spotting this. llvm-svn: 147384
* Revert r147271. This fixes PR11676.Rafael Espindola2011-12-301-5/+2
| | | | llvm-svn: 147362
* constexpr: perform zero-initialization prior to / instead of performing aRichard Smith2011-12-251-2/+5
| | | | | | 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-9/+7
| | | | | | constant expressions. llvm-svn: 147035
* constexpr handling improvements. Produce detailed diagnostics when a 'constexpr'Richard Smith2011-12-191-4/+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
* C++11 constexpr: Add note stacks containing backtraces if constant evaluationRichard Smith2011-12-161-0/+73
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
OpenPOWER on IntegriCloud