[clang] [Clang] Make -fcomplete-member-pointers the same as using the Microsoft C++ ABI (PR #98010)

Mital Ashok via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 8 04:10:02 PDT 2024


MitalAshok wrote:

TODO:

 - Tests for `-Wincomplete-member-pointer`
 - Possibly do something else about `-fsanitize=cfi-mfcall`. `-Wincomplete-member-pointer` is too broad, for the sanitizer we only care about a call to a pointer to member function. The warning could also be emitted here: https://github.com/llvm/llvm-project/blob/1b8ab2f08998d3220e5d95003d47bb3d7cac966b/clang/lib/CodeGen/ItaniumCXXABI.cpp#L800
 - It's weird that `-fcomplete-member-pointers` enables an error. Possibly deprecate `-fcomplete-member-pointers` and have it be an alias for `-fmicrosoft-complete-member-pointers -Werror=microsoft-incomplete-member-pointer` (where `-fmicrosoft-complete-member-pointers` is a new option).
 - Release note
 - Maybe reword the warning with `-fcomplete-member-pointers` is used with a non-Microsoft ABI. It's not actually an ODR violation then, and the `__single_inheritance` etc. keywords might not be available.

https://github.com/llvm/llvm-project/pull/98010


More information about the cfe-commits mailing list