[PATCH] D146376: Update static_assert message for redundant cases
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 22 10:49:55 PDT 2023
tbaeder added a comment.
I think just checking that the toplevel binary operator is a logical or should be enough? Since that only fails if both operands evaluate to false, so we don't need to print the "false or false" diagnostic.
================
Comment at: clang/test/SemaCXX/static-assert.cpp:262
static_assert(invert(true) == invert(false), ""); // expected-error {{failed}} \
- // expected-note {{evaluates to 'false == true'}}
----------------
This diagnostic should be kept. From looking at the condition, it is not obvious what the two functions evaluate to.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146376/new/
https://reviews.llvm.org/D146376
More information about the cfe-commits
mailing list