summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/special/class.copy/implicit-move.cpp
Commit message (Collapse)AuthorAgeFilesLines
* PR6037Nathan Sidwell2015-01-191-1/+1
| | | | | | Warn on inaccessible direct base llvm-svn: 226423
* Revert "Don't require -re suffix on -verify directives with regexes."Alp Toker2013-12-141-5/+5
| | | | | | | | | | This patch was submitted to the list for review and didn't receive a LGTM. (In fact one explicit objection and one query were raised.) This reverts commit r197295. llvm-svn: 197299
* Don't require -re suffix on -verify directives with regexes.Hans Wennborg2013-12-141-5/+5
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D2392 llvm-svn: 197295
* Change semantics of regex expectations in the diagnostic verifierHans Wennborg2013-12-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | | Previously, a line like // expected-error-re {{foo}} treats the entirety of foo as a regex. This is inconvenient when matching type names containing regex characters. For example, to match "void *(class test8::A::*)(void)" inside such a regex, one would have to type "void \*\(class test8::A::\*\)\(void\)". This patch changes the semantics of expected-error-re to only treat the parts of the directive wrapped in double curly braces as regexes. This avoids the escaping problem and leads to nicer patterns for those cases; see e.g. the change to test/Sema/format-strings-scanf.c. (The balanced search for closing }} of a directive also makes us handle the full directive in test\SemaCXX\constexpr-printing.cpp:41 and :53.) Differential Revision: http://llvm-reviews.chandlerc.com/D2388 llvm-svn: 197092
* Issue a diagnostic if an implicitly-defined move assignment operator would moveRichard Smith2013-11-041-0/+55
| | | | | | | the same virtual base class multiple times (and the move assignment is used, and the move assignment for the virtual base is not trivial). llvm-svn: 193977
* Implement final resolution of DR1402: implicitly-declared move operators thatRichard Smith2013-11-041-41/+51
| | | | | | | | | | | 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). llvm-svn: 193969
* Implement [class.friend]p11's special name lookup rules for friend declarationsRichard Smith2013-08-091-18/+18
| | | | | | | | of local classes. We were previously handling this by performing qualified lookup within a function declaration(!!); replace it with the proper scope lookup. llvm-svn: 188050
* Improve diagnostic wording for when an implicitly-deleted special memberRichard Smith2012-12-281-1/+1
| | | | | | function is selected by overload resolution. llvm-svn: 171190
* PR12625: Cope with classes which have incomplete base or member types:Richard Smith2012-04-251-0/+7
| | | | | | | Don't try to query whether an incomplete type has a trivial copy constructor when determining whether a move constructor should be declared. llvm-svn: 155575
* Fix bug where a class's (deleted) copy constructor would be implicitly given aRichard Smith2012-04-201-4/+4
| | | | | | | | non-const reference parameter type if the class had any subobjects with deleted copy constructors. This causes a rejects-valid if the class's copy constructor is explicitly defaulted (as happens for some implementations of std::pair etc). llvm-svn: 155218
* PR10217 diagnostic fix: don't say 'copy constructor' when we meanRichard Smith2012-04-021-1/+1
| | | | | | 'copy assignment operator'. llvm-svn: 153897
* Finish PR10217: Ensure we say that a special member was implicitly, notRichard Smith2012-04-021-2/+2
| | | | | | explicitly, deleted in all relevant cases, and explain why. llvm-svn: 153894
* Implement DR1402: if a field or base class is not movable, the derived class'sRichard Smith2012-04-021-0/+72
| | | | | | | | | | | move constructor/move assignment operator are not declared, rather than being defined as deleted, so move operations on the derived class fall back to copying rather than moving. If a move operation on the derived class is explicitly defaulted, the unmovable subobject will be copied instead of being moved. llvm-svn: 153883
* PR10217: Provide diagnostics explaining why an implicitly-deleted specialRichard Smith2012-03-301-3/+3
| | | | | | member function is deleted. llvm-svn: 153773
* When overload resolution picks an implicitly-deleted special memberDouglas Gregor2012-02-151-5/+5
| | | | | | | | | function, provide a specialized diagnostic that indicates the kind of special member function (default constructor, copy assignment operator, etc.) and that it was implicitly deleted. Add a hook where we can provide more detailed information later. llvm-svn: 150611
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Declare and define implicit move constructor and assignment operator.Sebastian Redl2011-08-301-0/+164
This makes the code duplication of implicit special member handling even worse, but the cleanup will have to come later. For now, this works. Follow-up with tests for explicit defaulting and enabling the __has_feature flag to come. llvm-svn: 138821
OpenPOWER on IntegriCloud