[PATCH] D155064: [clang][SemaCXX] Diagnose tautological uses of consteval if and is_constant_evaluated
Takuya Shimizu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 21 09:03:46 PDT 2023
hazohelet added a comment.
In D155064#4514893 <https://reviews.llvm.org/D155064#4514893>, @cor3ntin wrote:
> This looks good to me modulo nitpicks.
> When you land that, please make an issue on github for the missing narrowing warning, it seems important.
>
> I'll wait before approving in case @aaron.ballman spot things i missed
I've already prepared another patch to fix the narrowing issue. Should I add the diff to this patch or open another revision?
FWIW, I believe `const bool c = std::is_constant_evaluated();` this particular case should also be diagnosed because it could be a common mistake as was mentioned in https://github.com/llvm/llvm-project/issues/43760#issuecomment-981022686.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155064/new/
https://reviews.llvm.org/D155064
More information about the cfe-commits
mailing list