summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/APValue.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add an APValue representation for the difference between two ↵Eli Friedman2012-01-041-1/+16
| | | | | | | | | | address-of-label expressions. Add support to Evaluate and CGExprConstant for generating/handling them. Remove the special-case for such differences in Expr::isConstantInitializer. With that done, remove a bunch of buggy code from CGExprConstant for handling scalar expressions which is no longer necessary. Fixes PR11705. llvm-svn: 147561
* Add missing flush call. This is an attempt to fix a broken Windows buildbot.Eli Friedman2011-12-161-0/+1
| | | | llvm-svn: 146760
* C++11 constexpr: Add note stacks containing backtraces if constant evaluationRichard Smith2011-12-161-57/+192
| | | | | | | | | | 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
* Constant expression evaluation: add support for evaluation of member pointersRichard Smith2011-11-171-16/+105
| | | | | | and base-to-derived casts, and add proper handling of temporaries. llvm-svn: 144926
* Represent an APValue based on a Decl as that Decl, rather than a DeclRefExprRichard Smith2011-11-121-9/+4
| | | | | | | | or MemberExpr which refers to it. As a side-effect, MemberExprs which refer to static member functions and static data members are now emitted as constant expressions. llvm-svn: 144468
* Constant expression evaluation: support for evaluation of structs and unions ofRichard Smith2011-11-101-12/+78
| | | | | | | literal types, as well as derived-to-base casts for lvalues and derived-to-virtual-base casts. llvm-svn: 144265
* Constant expression evaluation: support for arrays.Richard Smith2011-11-071-2/+43
| | | | llvm-svn: 143922
* Fix 32-bit build bots and remove some casting-away-const warnings.Richard Smith2011-11-071-2/+6
| | | | llvm-svn: 143914
* Constant expression evaluation: preserve subobject designator when flattening aRichard Smith2011-11-071-8/+63
| | | | | | core constant value down to an APValue. llvm-svn: 143909
* constexpr function substitution:Richard Smith2011-10-291-4/+3
| | | | | | | | Track the function invocation where an lvalue referring to a constexpr function parameter originated from, and use it to substitute the correct argument and to determine whether such an argument's lifetime has ended. llvm-svn: 143296
* Fix missing includes for llvm_unreachableDavid Blaikie2011-09-231-0/+1
| | | | llvm-svn: 140368
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-2/+2
| | | | llvm-svn: 140367
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-2/+2
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Define DiagnosticBuilder<<APValue so it's easy to include APValues inJeffrey Yasskin2011-07-181-0/+45
| | | | | | diagnostics. llvm-svn: 135398
* Refactoring of constant expression evaluatorPeter Collingbourne2011-05-131-4/+4
| | | | | | | | | This introduces a generic base class for the expression evaluator classes, which handles a few common expression types which were previously handled separately in each class. Also, the expression evaluator now uses ConstStmtVisitor. llvm-svn: 131281
* Fix -Wcast-qual warnings.Dan Gohman2010-04-191-1/+2
| | | | llvm-svn: 101786
* Convert the type of the LValue offset variable in APValue to CharUnits, movingKen Dyck2010-01-151-0/+33
| | | | | | the LValue-related methods of APValue out of line to avoid header file leaching. llvm-svn: 93512
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-1/+1
| | | | llvm-svn: 81346
* Make sure to access APValue's data via a char array (rather thanDouglas Gregor2009-09-081-7/+7
| | | | | | | | through an array of void*), so that we don't run afoul of the strict-aliasing rules in C++ 3.10p15. Unfortunately, GCC 4.4 still complains about this code. llvm-svn: 81251
* Remove some now-unneeded calls to llvm::errs().flush().Daniel Dunbar2009-03-101-1/+0
| | | | llvm-svn: 66555
* Support evaluation of vector constant expressions, and codegen of same.Nate Begeman2009-01-181-1/+3
| | | | llvm-svn: 62455
* Add support for vectors to APValue. Vector constant evaluator and tests coming.Nate Begeman2009-01-181-0/+10
| | | | llvm-svn: 62438
* add dump and print methods, add operator<< for APValue.Chris Lattner2008-11-161-0/+97
llvm-svn: 59411
OpenPOWER on IntegriCloud