d079abfb5eefaf7da232e39a6564f561402cf4fe |
|
07-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
A union can have a constexpr defaulted default constructor, if it has an in-class initializer for one of its fields. Value-initialization of such a type should use the in-class initializer! The former was just a bug, the latter is a (reported) standard defect. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/special/class.ctor/p6-0x.cpp
|
86c3ae46250cdcc57778c27826060779a92f3815 |
|
13-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Update constexpr implementation to match CWG's chosen approach for core issues 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/special/class.ctor/p6-0x.cpp
|
51201882382fb40c9456a06c7f93d6ddd4a57712 |
|
30-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Unrevert r147271, reverted in r147361. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/special/class.ctor/p6-0x.cpp
|
f8c2a33b6e47c494b83e68f02f4ee67ca8fd8e3b |
|
30-Dec-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert r147271. This fixes PR11676. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/special/class.ctor/p6-0x.cpp
|
eba05b2e396e1474f7bd6e8e8e1bd7752effef4d |
|
25-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: perform zero-initialization prior to / instead of performing a constructor call when appropriate. Thanks to Eli for spotting this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/special/class.ctor/p6-0x.cpp
|
6180245e9f63d2927b185ec251fb75aba30f1cac |
|
22-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR11614: Mark defaulted special constructors as constexpr if their implicit definition would satisfy the constexpr requirements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/special/class.ctor/p6-0x.cpp
|