[PATCH] D99005: [clang] Implement P2266 Simpler implicit move
Matheus Izvekov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 28 16:19:24 PDT 2021
mizvekov updated this revision to Diff 333745.
mizvekov added a comment.
So it turns out there was a pre-existing bug where ObjC++ blocks
with dependent return type were not getting copy elision.
My latest refactoring accidentally fixed this in the return statement
sema action, but unfortunately the template instantiator still expects
only FunctionDecl and crashes otherwise.
I am not sure there is an easy way to fix this, as BlockDecl
doesn't even carry a type unlike FunctionDecl, so there is no easy way
to get the return type.
This might require some surgery to fix, so for now I am just
skipping it and putting a FIXME.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99005/new/
https://reviews.llvm.org/D99005
Files:
clang/include/clang/Sema/Sema.h
clang/lib/Sema/Sema.cpp
clang/lib/Sema/SemaCoroutine.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/lib/Sema/SemaStmt.cpp
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clang/lib/Sema/SemaType.cpp
clang/test/CXX/class/class.init/class.copy.elision/p3.cpp
clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7-cxx14.cpp
clang/test/CXX/drs/dr3xx.cpp
clang/test/CXX/expr/expr.prim/expr.prim.lambda/p4-cxx14.cpp
clang/test/CXX/temp/temp.decls/temp.mem/p5.cpp
clang/test/SemaCXX/constant-expression-cxx11.cpp
clang/test/SemaCXX/constant-expression-cxx14.cpp
clang/test/SemaCXX/coroutine-rvo.cpp
clang/test/SemaCXX/coroutines.cpp
clang/test/SemaCXX/deduced-return-type-cxx14.cpp
clang/test/SemaCXX/return-stack-addr.cpp
clang/test/SemaCXX/warn-return-std-move.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99005.333745.patch
Type: text/x-patch
Size: 57616 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210328/75e228bb/attachment-0001.bin>
More information about the cfe-commits
mailing list