There are some simple messages where an expansion isn't particularly helpful or needed. We aim to eliminate expansions that don't add much value for user (this will give us slightly more room or prioritise to have longer diagnostics elsewhere).
The test case for which it has been tested:
constexpr auto is_gitlab = false; constexpr auto is_weekend = false; static_assert(is_gitlab or is_weekend);
Previous warning/error message:
<source>:4:1: error: static assertion failed due to requirement 'is_gitlab || is_weekend' static_assert(is_gitlab or is_weekend); ^ ~~~~~~~~~~~~~~~~~~~~~~~ <source>:4:25: note: expression evaluates to 'false || false' static_assert(is_gitlab or is_weekend); ~~~~~~~~~~^~~~~~~~~~~~~
Currrent warning/error message:
<source>:4:1: error: static assertion failed due to requirement 'is_gitlab' static_assert(is_gitlab and is_weekend); ^ ~~~~~~~~~
This patch aims to remove some redundant cases of static assert messages where the expansions are particularly unhelpful. In this particular patch, we have ignored the printing of diagnostic warnings for binary operators with logical OR operations.
This is done to prioritise and prefer to emit longer diagnostic warnings for more important concerns elsewhere.