Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | PR12012: Fix a regression in r150419 where we would try (and fail) to | Richard Smith | 2012-02-17 | 1 | -0/+6 |
| | | | | | | | zero-initialize class types with virtual bases when constant-evaluating an initializer. llvm-svn: 150770 | ||||
* | Update constexpr implementation to match CWG's chosen approach for core issues | Richard Smith | 2012-02-13 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | 1358, 1360, 1452 and 1453. - Instantiations of constexpr functions are always constexpr. This removes the need for separate declaration/definition checking, which is now gone. - This makes it possible for a constexpr function to be virtual, if they are only dependently virtual. Virtual calls to such functions are not constant expressions. - Likewise, it's now possible for a literal type to have virtual base classes. A constexpr constructor for such a type cannot actually produce a constant expression, though, so add a special-case diagnostic for a constructor call to such a type rather than trying to evaluate it. - Classes with trivial default constructors (for which value initialization can produce a fully-initialized value) are considered literal types. - Classes with volatile members are not literal types. - constexpr constructors can be members of non-literal types. We do not yet use static initialization for global objects constructed in this way. llvm-svn: 150359 | ||||
* | Unrevert r147271, reverted in r147361. | Richard Smith | 2011-12-30 | 1 | -0/+31 |
| | | | | | | | | | | | | 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 Espindola | 2011-12-30 | 1 | -31/+0 |
| | | | | llvm-svn: 147362 | ||||
* | constexpr: perform zero-initialization prior to / instead of performing a | Richard Smith | 2011-12-25 | 1 | -0/+31 |
constructor call when appropriate. Thanks to Eli for spotting this. llvm-svn: 147271 |