llvm-project/clang/test
Richard Smith 96cd671cd6 PR19668, PR23034: Fix handling of move constructors and deleted copy
constructors when deciding whether classes should be passed indirectly.

This fixes ABI differences between Clang and GCC:

 * Previously, Clang ignored the move constructor when making this
   determination. It now takes the move constructor into account, per
   https://github.com/itanium-cxx-abi/cxx-abi/pull/17 (this change may
   seem recent, but the ABI change was agreed on the Itanium C++ ABI
   list a long time ago).

 * Previously, Clang's behavior when the copy constructor was deleted
   was unstable -- depending on whether the lazy declaration of the
   copy constructor had been triggered, you might get different behavior.
   We now eagerly declare the copy constructor whenever its deletedness
   is unclear, and ignore deleted copy/move constructors when looking for
   a trivial such constructor.

This also fixes an ABI difference between Clang and MSVC:

 * If the copy constructor would be implicitly deleted (but has not been
   lazily declared yet), for instance because the class has an rvalue
   reference member, we would pass it directly. We now pass such a class
   indirectly, matching MSVC.

Based on a patch by Vassil Vassilev, which was based on a patch by Bernd
Schmidt, which was based on a patch by Reid Kleckner!

This is a re-commit of r310401, which was reverted in r310464 due to ARM
failures (which should now be fixed).

llvm-svn: 310983
2017-08-16 01:49:53 +00:00
..
ARCMT clang/test/ARCMT/remap-applying.c: Use %/s on the command line of echo(1). 2017-04-28 05:02:52 +00:00
ASTMerge Revert r299355 "[ASTImporter] Fix for importing unnamed structs" 2017-04-03 21:06:45 +00:00
Analysis Fixup for r310950: Also remove the new instance of %T from html-diags.c 2017-08-15 19:54:04 +00:00
CXX Do not look through pack expansions when looking for unexpanded parameter packs. 2017-08-15 22:58:45 +00:00
CodeCompletion Fixed failing assert in code completion. 2017-07-21 09:24:00 +00:00
CodeGen Revert r302670 for the upcoming 5.0.0 release 2017-08-11 11:39:07 +00:00
CodeGenCUDA CodeGenModule: Always output wchar_size, check LLVM assumptions. 2017-05-20 01:29:55 +00:00
CodeGenCXX PR19668, PR23034: Fix handling of move constructors and deleted copy 2017-08-16 01:49:53 +00:00
CodeGenCoroutines [coroutines] Evaluate the operand of void `co_return` expressions. 2017-07-31 07:48:13 +00:00
CodeGenObjC Adopt to LLVM API change (llvm.dbg.value no longer has an offset) 2017-07-28 20:21:08 +00:00
CodeGenObjCXX test: fix test for release builds 2017-06-27 18:57:50 +00:00
CodeGenOpenCL Attempt to fix failure in CodeGenOpenCL/atomic-ops.cl again 2017-08-15 17:59:26 +00:00
Coverage [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output 2017-08-03 18:12:22 +00:00
CoverageMapping [clang] Get rid of "%T" expansions 2017-08-15 19:47:06 +00:00
Driver Revert "Revert "Revert "Fix LLVMgold plugin name/path for non-Linux.""" 2017-08-15 23:57:34 +00:00
FixIt [clang] Get rid of "%T" expansions 2017-08-15 19:47:06 +00:00
Format [clang] Get rid of "%T" expansions 2017-08-15 19:47:06 +00:00
Frontend [ValueTracking] Enabling ValueTracking patch by default (recommit). Part 1. 2017-08-10 11:22:52 +00:00
Headers Add test that we get the correct calling convention and mangling for va_list. 2017-08-16 01:46:46 +00:00
Import This adds the argument --dump-ir to clang-import-test, which allows 2017-08-07 22:27:30 +00:00
Index [index] Update indexing to handle CXXDeductionGuideDecls properly 2017-08-15 17:20:37 +00:00
Integration Tie the macOS tests in test/Integration to the latest macOS SDK 2017-06-02 11:26:35 +00:00
Layout Print nested name specifiers for typedefs and type aliases 2017-03-10 15:04:58 +00:00
Lexer Add missing test for warning added in r310803. 2017-08-16 00:06:07 +00:00
Misc [diagtool] Add ability to pass in the id and return the name for a 2017-08-03 16:13:13 +00:00
Modules [clang] Get rid of "%T" expansions 2017-08-15 19:47:06 +00:00
OpenMP [OPENMP] Fix compiler crash on argument translate for NVPTX. 2017-08-15 14:34:04 +00:00
PCH [clang] Get rid of "%T" expansions 2017-08-15 19:47:06 +00:00
Parser Replace remaining user-visible mentions of C++1z with C++17. 2017-08-13 22:26:53 +00:00
Preprocessor [clang] Get rid of "%T" expansions 2017-08-15 19:47:06 +00:00
Profile [Profile] Do not assign counters to functions without bodies 2017-06-30 21:02:14 +00:00
Rewriter [Objective-C] Fix non-determinism in clang 2017-07-06 18:49:57 +00:00
Sema Allow pretty platform names in availability attributes 2017-08-15 14:42:01 +00:00
SemaCUDA PR34163: Don't cache an incorrect key function for a class if queried between 2017-08-12 01:46:03 +00:00
SemaCXX PR33082: Improve tracking of unexpanded parameter packs within variadic generic lambdas. 2017-08-15 19:11:21 +00:00
SemaObjC [Sema] Silence -Wobjc-missing-property-synthesis for unavailable properties 2017-08-15 12:40:01 +00:00
SemaObjCXX Fix errored return value in CheckFunctionReturnType and add a fixit hint 2017-05-10 20:03:16 +00:00
SemaOpenCL Remove -finclude-default-header in OpenCL atomic tests 2017-08-15 16:30:31 +00:00
SemaTemplate Replace remaining user-visible mentions of C++1z with C++17. 2017-08-13 22:26:53 +00:00
TableGen
Tooling [clang] Get rid of "%T" expansions 2017-08-15 19:47:06 +00:00
Unit Change remaining references to lit.util.capture to use subprocess.check_output. 2017-07-06 21:46:47 +00:00
VFS
clang-rename Move ClassReplacements.cpp test from clang-rename tests to the 2017-06-30 16:58:36 +00:00
.clang-format
CMakeLists.txt Clang's tests should depend on clang-diff 2017-07-21 13:12:01 +00:00
TestRunner.sh
cxx-sections.data
lit.cfg [clang] Add abi-breaking-checks support to clang 2017-07-25 23:00:02 +00:00
lit.site.cfg.in [clang] Add abi-breaking-checks support to clang 2017-07-25 23:00:02 +00:00
make_test_dirs.pl