]> granicus.if.org Git - clang/commit
Fix MSVC constructor call extension after b92d290e48e9 (r353181).
authorJames Y Knight <jyknight@google.com>
Wed, 6 Feb 2019 00:06:03 +0000 (00:06 +0000)
committerJames Y Knight <jyknight@google.com>
Wed, 6 Feb 2019 00:06:03 +0000 (00:06 +0000)
commit12c4033099e6c0cc99222965f7cfbdea9fb036c4
tree527cb4e6664954a13a14e4d70cba1566330bfb23
parent26e77b4d957d6eb9983421365f7456cca056f7ed
Fix MSVC constructor call extension after b92d290e48e9 (r353181).

The assert added to EmitCall there was triggering in Windows Chromium
builds, due to a mismatch of the return type.

The MSVC constructor call extension (`this->Foo::Foo()`) was emitting
the constructor call from 'EmitCXXMemberOrOperatorMemberCallExpr' via
calling 'EmitCXXMemberOrOperatorCall', instead of
'EmitCXXConstructorCall'. On targets where HasThisReturn is true, that
was failing to set the proper return type in the call info.

Switching to calling EmitCXXConstructorCall also allowed removing some
code e.g. the trivial copy/move support, which is already handled in
EmitCXXConstructorCall.

Ref: https://bugs.chromium.org/p/chromium/issues/detail?id=928861
Differential Revision: https://reviews.llvm.org/D57794

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@353246 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExprCXX.cpp
test/CodeGenCXX/constructor-direct-call.cpp