[PATCH] D150364: [clang][Interp] Add 'Unsupported' opcode and use it for throw stmts

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 11 23:26:52 PDT 2023


tbaeder added a comment.

In D150364#4335282 <https://reviews.llvm.org/D150364#4335282>, @aaron.ballman wrote:

> In D150364#4335261 <https://reviews.llvm.org/D150364#4335261>, @tbaeder wrote:
>
>> In D150364#4335221 <https://reviews.llvm.org/D150364#4335221>, @aaron.ballman wrote:
>>
>>> "Unsupported" is a bit of a loaded term -- it could mean "this operation is not supported, YET" or it could mean "this operation is not and will not be supported, EVER". Perhaps something more like "InvalidInConstantExpr" would be more descriptive?
>>
>> I guess it would be more descriptive, but it could still mean that it is "not yet valid in a constant expression", so I guess I don't see the upside of using a longer opcode name.
>
> I don't feel strongly; it's easy enough to rename if we think it's causing confusion. FWIW, my first thought was "Oh, we're planning to support throw expressions in constant expressions? Please don't tell WG21." I'm used to seeing "invalid" for things that are never valid and "unsupported" for things that aren't supported but might be someday. However, I also see we use "unsupported" in the same sense you're using it here in some of our diagnostics, so I'm fine with whatever you want to go with.

I didn't know about that distinction, renaming to `invalid` is fine with me.


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

https://reviews.llvm.org/D150364



More information about the cfe-commits mailing list