[PATCH] D119209: [clang] Add cc1 option -fctor-dtor-return-this

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 3 14:06:22 PDT 2022


MaskRay added inline comments.


================
Comment at: clang/include/clang/Basic/CodeGenOptions.def:495
 
+/// Modify C++ ABI to returning `this` pointer from constructors and
+/// non-deleting destructors. (No effect on Microsoft ABI.)
----------------
Modify `Itanium C++ ABI` and delete ` (No effect on Microsoft ABI.)`


================
Comment at: clang/include/clang/Driver/Options.td:5608
+def fctor_dtor_return_this : Flag<["-"], "fctor-dtor-return-this">,
+  HelpText<"Change the C++ ABI to returning `this` pointer from constructors "
+           "and non-deleting destructors. (No effect on Microsoft ABI.)">,
----------------
scw wrote:
> MaskRay wrote:
> > If you use Itanium C++ ABI, it's clear it doesn't change Microsoft ABI.
> > 
> > The convention for HelpText is to omit the trailing period.
> I was gonna do that but realized the change actually apply to all C++ ABIs (I changed CGCXXABI). It's just Microsoft overrides the same method I changed making it a no-op.
Not done?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119209/new/

https://reviews.llvm.org/D119209



More information about the cfe-commits mailing list