rjmccall added inline comments.
================ Comment at: lib/CodeGen/CGCall.cpp:1893 + + IsCtor = isa<CXXConstructorDecl>(TargetDecl); } ---------------- AntonBikineev wrote: > rjmccall wrote: > > I feel like you should just use `TargetDecl && > > isa<CXXConstructorDecl>(TargetDecl)` below; it's more obvious. > > > > Is there not an analogous rule for destructors? > There appears to be no similar rule for destructors, maybe because at the > point of calling a destructor the value of the object/subobjects is > well-determined. That's a good point, although there's certainly a point during the destructor's execution that that's no longer true. ================ Comment at: lib/CodeGen/CGCall.cpp:2049 + // from the constructor’s this pointer, the value of the object or + // subobject thus obtained is unspecified. + unsigned ThisIRArg, NumIRArgs; ---------------- You probably ought to add here that we're treating this as undefined behavior and have recommended the standard be changed. https://reviews.llvm.org/D46441 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits