Open genbattle opened 8 years ago
...and defeats the expression decomposition...
See also:
I'm following this discussion and see what comes out of it.
I might try to change lest_DECOMPOSE()
to use:
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Woverloaded-shift-op-parentheses\"") \
( lest::expression_decomposer() << expr ) \
_Pragma("clang diagnostic pop") \
Ah, it appears I didn't fully understand the intention of the code. Ignoring the warning may be a better solution in this case if the behaviour is intended.
As an aside:
For some time lest
does contain:
#ifdef __clang__
...
# pragma clang diagnostic ignored "-Woverloaded-shift-op-parentheses"
...
Keeping this open to remind myself about this ongoing discussion with Catch.
Compiling tests that use lest under clang++ (3.7) yields warnings for each EXPECT such as the following:
The warning is talking about this line in lest.hpp:
Adding extra parenthesis prevents this warning, and a potentially catastrophic evaluation order mess: