[c++17] P0135R1: Guaranteed copy elision.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 6 Dec 2016 23:52:28 +0000 (23:52 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 6 Dec 2016 23:52:28 +0000 (23:52 +0000)
commit9d208e19f424c4a10afbd6d391cd3cbe49a1d6d4
tree04fc1ea37b0d9a65a64d5309cd4b3fac12f4648b
parent31a3f52040e75efea0e486ddc168b604947451fe
[c++17] P0135R1: Guaranteed copy elision.

When an object of class type is initialized from a prvalue of the same type
(ignoring cv qualifications), use the prvalue to initialize the object directly
instead of inserting a redundant elidable call to a copy constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288866 91177308-0d34-0410-b5e6-96231b3b80d8
18 files changed:
include/clang/AST/Expr.h
lib/AST/Expr.cpp
lib/AST/ExprConstant.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprAgg.cpp
lib/CodeGen/CGExprConstant.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaInit.cpp
lib/Sema/SemaOverload.cpp
test/CXX/drs/dr0xx.cpp
test/CXX/drs/dr10xx.cpp
test/CXX/drs/dr1xx.cpp
test/CXX/drs/dr4xx.cpp
test/CodeGenCXX/cxx1z-copy-omission.cpp [new file with mode: 0644]
test/SemaCXX/aggregate-initialization.cpp
test/SemaCXX/cxx1z-copy-omission.cpp [new file with mode: 0644]
www/cxx_dr_status.html
www/cxx_status.html