[PATCH] D44619: [CodeGen] Add cleanup scope to EmitInlinedInheritingCXXConstructorCall

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 19 10:49:47 PDT 2018


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

Code looks good, but we should make the test more robust and self-documenting.



================
Comment at: test/CodeGenCXX/inheriting-constructor-cleanup.cpp:22
+// CHECK-LABEL: define void @_Z1fv
+// CHECK: call void @_ZN1SD2Ev
----------------
The landingpad should be trivially dead, since T has nothing that throws in it, right? Clang is usually pretty smart about not emitting unused exceptional-only destructors, so I'd try to defend against it getting smart in the future. I'd put a function call `foo` in `T(int, ...)`, then CHECK for the invoke of it, and that it unwinds to a landingpad preceding this destructor call.


Repository:
  rC Clang

https://reviews.llvm.org/D44619





More information about the cfe-commits mailing list