a10b97898ee6339c3110e6ca33f178ff52f05238 |
|
22-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++1y constexpr extensions, round 1: Allow most forms of declaration and statement in constexpr functions. Everything which doesn't require variable mutation is also allowed as an extension in C++11. 'void' becomes a literal type to support constexpr functions which return 'void'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/basic/basic.types/p10.cpp
|
840462670ba7a6bc26265a2306b35f2f0f01f51c |
|
21-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
The 'constexpr implies const' rule for non-static member functions is gone in C++1y, so stop adding the 'const' there. Provide a compatibility warning for code relying on this in C++11, with a fix-it hint. Update our lazily-written tests to add the const, except for those ones which were testing our implementation of this rule. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/basic/basic.types/p10.cpp
|
ac71351acdefc9de0c770c1d717e621ac9e684bf |
|
08-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Properly compute triviality for explicitly-defaulted or deleted special members. Remove pre-standard restriction on explicitly-defaulted copy constructors with 'incorrect' parameter types, and instead just make those special members non-trivial as the standard requires. This required making CXXRecordDecl correctly handle classes which have both a trivial and a non-trivial special member of the same kind. This also fixes PR13217 by reimplementing DiagnoseNontrivial in terms of the new triviality computation technology. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/basic/basic.types/p10.cpp
|
c799a6a5c884831c3c3ea57d30fbe4ab35709d49 |
|
26-Apr-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
If a type is non-literal by virtue of being incomplete produce notes explaining that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/basic/basic.types/p10.cpp
|
ee0653963537f6ea60f655856fb0c83d7d4010db |
|
21-Feb-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Make RequireLiteralType work correctly with incomplete array types. PR12037. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/basic/basic.types/p10.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/basic/basic.types/p10.cpp
|
b4e5e286a5cd156247720b1eb204abaa8e09568d |
|
09-Feb-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
CWG issue 1405: mutable members are allowed in literal types, but can't undergo lvalue-to-rvalue conversions in constant expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/basic/basic.types/p10.cpp
|
8ef7b203332b0c8d65876a1f5e6d1db4e6f40e4b |
|
19-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: converted constant expression handling for enumerator values, case values and non-type template arguments of integral and enumeration types. This change causes some legal C++98 code to no longer compile in C++11 mode, by enforcing the C++11 rule that narrowing integral conversions are not permitted in the final implicit conversion sequence for the above cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/basic/basic.types/p10.cpp
|
099e7f647ccda915513f2b2ec53352dc756082d3 |
|
19-Dec-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr handling improvements. Produce detailed diagnostics when a 'constexpr' 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/basic/basic.types/p10.cpp
|
45fa560c72441069d9e4eb1e66efd87349caa552 |
|
07-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
When we notice that a member function is defined with "= delete" or "= default", make a note of which is used when creating the initial declaration. Previously, we would wait until later to handle default/delete as a definition, but this is too late: when adding the declaration, we already treated the declaration as "user-provided" when in fact it was merely "user-declared". Fixes PR10861 and PR10442, along with a bunch of FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/basic/basic.types/p10.cpp
|
762bb9d0ad20320b9f97a841dce57ba5e8e48b07 |
|
14-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Update all tests other than Driver/std.cpp to use -std=c++11 rather than -std=c++0x. Patch by Ahmed Charles! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/basic/basic.types/p10.cpp
|
5fa6a0422f12216d549d0f2991a29d5690634065 |
|
12-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: don't consider class types with mutable members to be literal types. The standard doesn't allow this, but mutable constexpr variables break the semantics so badly that we can't reasonably accept them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/basic/basic.types/p10.cpp
|
9f569cca2a4c5fb6026005434e27025b9e71309d |
|
01-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: semantic checking for constexpr functions and constructors. Based in part on patches by Peter Collingbourne. We diverge from the C++11 standard in a few areas, mostly related to checking constexpr function declarations, and not just definitions. See WG21 paper N3308=11-0078 for details. Function invocation substitution is not available in this patch; constexpr functions cannot yet be used from within constant expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/basic/basic.types/p10.cpp
|