[PATCH] D57794: Fix MSVC constructor call extension after b92d290e48e9 (r353181).

James Y Knight via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 5 15:32:20 PST 2019


jyknight created this revision.
jyknight added reviewers: thakis, rsmith.
Herald added subscribers: cfe-commits, mstorsjo.
Herald added a project: clang.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D57794

Files:
  clang/lib/CodeGen/CGExprCXX.cpp
  clang/test/CodeGenCXX/constructor-direct-call.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57794.185426.patch
Type: text/x-patch
Size: 7535 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190205/68c77813/attachment-0001.bin>


More information about the cfe-commits mailing list