743cbb91499e138a63a398c6515667905f1b3be8 |
|
04-Nov-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement final resolution of DR1402: implicitly-declared move operators that would be deleted are still declared, but are ignored by overload resolution. Also, don't delete such members if a subobject has no corresponding move operation and a non-trivial copy. This causes us to implicitly declare move operations in more cases, but risks move-assigning virtual bases multiple times in some circumstances (a warning for that is to follow). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/special/class.copy/p12-0x.cpp
|
bc2a35d5ff492107dab5bdb7682f0da2f4a88861 |
|
08-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Finish implementing 'selected constructor' rules for triviality in C++11. In the cases where we can't determine whether special members would be trivial while building the class, we eagerly declare those special members. The impact of this is bounded, since it does not trigger implicit declarations of special members in classes which merely *use* those classes. In order to determine whether we need to apply this rule, we also need to eagerly declare move operations and destructors in cases where they might be deleted. If a move operation were supposed to be deleted, it would instead be suppressed, and we could need overload resolution to determine if we fall back to a trivial copy operation. If a destructor were implicitly deleted, it would cause the move constructor of any derived classes to be suppressed. As discussed on cxx-abi-dev, C++11's selected constructor rules are also retroactively applied as a defect resolution in C++03 mode, in order to identify that class B has a non-trivial copy constructor (since it calls A's constructor template, not A's copy constructor): struct A { template<typename T> A(T &); }; struct B { mutable A a; }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CXX/special/class.copy/p12-0x.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/special/class.copy/p12-0x.cpp
|