summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/uncopyable-args.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix CHECK directives that weren't checking.Hans Wennborg2015-08-311-3/+3
| | | | llvm-svn: 246492
* Update Clang tests to handle explicitly typed load changes in LLVM.David Blaikie2015-02-271-5/+5
| | | | llvm-svn: 230795
* Revert Itanium parts of "Don't copy objects with trivial, deleted copy ctors"Reid Kleckner2014-05-151-24/+30
| | | | | | | | | | | | | | | | | | | | | | | | This undoes half of r208786. It had problems with lazily declared special members in cases like this: struct A { A(); A &operator=(A &&o); void *p; }; void foo(A); void bar() { foo({}); } In this case, the copy and move constructors are implicitly deleted. However, Clang doesn't eagerly declare the copy ctor in the AST, so we pass the struct in registers. Furthermore, GCC passes this in registers even though this class should be uncopyable. Revert this for now until the dust settles. llvm-svn: 208836
* Don't copy objects with trivial, deleted copy ctorsReid Kleckner2014-05-141-0/+200
This affects both the Itanium and Microsoft C++ ABIs. This is in anticipation of a change to the Itanium C++ ABI, and should match GCC's current behavior. The new text will likely be: """ Pass an object of class type by value if every copy constructor and move constructor is deleted or trivial and at least one of them is not deleted, and the destructor is trivial. """ http://sourcerytools.com/pipermail/cxx-abi-dev/2014-May/002728.html On x86 Windows, we can mostly use the same logic, where we use inalloca instead of passing by address. However, on Win64, there are register parameters, and we have to do what MSVC does. MSVC ignores the presence of non-trivial move constructors and only considers the presence of non-trivial or deleted copy constructors. If a non-trivial or deleted copy ctor is present, it passes the argument indirectly. This change fixes bugs and makes us more ABI compatible with both GCC and MSVC. Fixes PR19668. Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D3660 llvm-svn: 208786
OpenPOWER on IntegriCloud