[PATCH] D135339: [clang] makes `__is_destructible` KEYCXX instead of KEYMS

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 6 09:40:29 PDT 2022


erichkeane added a comment.

In D135339#3840422 <https://reviews.llvm.org/D135339#3840422>, @cjdb wrote:

> In D135339#3840406 <https://reviews.llvm.org/D135339#3840406>, @erichkeane wrote:
>
>> In D135339#3840323 <https://reviews.llvm.org/D135339#3840323>, @cjdb wrote:
>>
>>> In D135339#3839876 <https://reviews.llvm.org/D135339#3839876>, @erichkeane wrote:
>>>
>>>> This doesn't cause us to lose this in Microsoft C mode, does it?  Otherwise, LGTM.
>>>
>>> Why is destructibility necessary in C?
>>
>> It isn't particularly?  But I don't want to change our behavior and break code if:
>>
>>   // foo.h
>>   struct S{};
>>   bool get_thing() {
>>   return __is_destructible(S);
>>   }
>>
>> someone runs that in C mode, expecting it to work.
>
> Right, I can add a C test if it passed in C mode before. Do you want that in a separate file, or can I get away with doing it in `type-traits-ms.cpp`?

No need for a separate file, just the -x c sorta flag is fine for me.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135339



More information about the cfe-commits mailing list