[PATCH] D152259: [Clang] Make increment bool SFINAE-friendly
Yurong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 6 07:11:11 PDT 2023
yronglin marked an inline comment as done.
yronglin added a comment.
In D152259#4399217 <https://reviews.llvm.org/D152259#4399217>, @erichkeane wrote:
> This should have a release note.
>
> I think the bug is asking to make this a SFINAE failure (it isn't clear what you mean by "SFINAE Friendly"). Our mechanism for that is to mark the diagnostic SFINAEError.
Thanks for your review and advice @erichkeane !
================
Comment at: clang/lib/Sema/SemaExpr.cpp:14603
+ // Ensure increment bool SFINAE-friendly.
+ if (S.isUnevaluatedContext() || S.isSFINAEContext())
+ return QualType();
----------------
erichkeane wrote:
> I think what you really need to do is just set `ext_increment_bool` to be `SFINAEError` in `DiagnosticSemaKinds.td`, right? Not all of this?
Thanks for your advice, your are right.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152259/new/
https://reviews.llvm.org/D152259
More information about the cfe-commits
mailing list