[PATCH] D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 23 15:17:06 PDT 2018


rjmccall added inline comments.


================
Comment at: lib/CodeGen/CGCall.cpp:3069
+  if (hasAggregateEvaluationKind(type) &&
+      getContext().isParamDestroyedInCallee(type)) {
+    EHScopeStack::stable_iterator cleanup =
----------------
ahatanak wrote:
> rjmccall wrote:
> > I wonder if this is something we should be taking from the CGFunctionInfo instead.  It does seem plausible that it could vary, e.g. according to the calling convention.  But maybe that's something we can handle in a separate patch?
> I assume you are talking about the call to isParamDestroyedInCallee? If so, yes, I think we can discuss it in a separate patch. I have plans to clean up the way ParamDestroyedInCallee is handled in Sema and IRGen.
> I assume you are talking about the call to isParamDestroyedInCallee?

Yeah.

> I assume you are talking about the call to isParamDestroyedInCallee? If so, yes, I think we can discuss it in a separate patch. 

Okay, great, thanks.


Repository:
  rC Clang

https://reviews.llvm.org/D45382





More information about the cfe-commits mailing list