Open abadams opened 1 day ago
clang-tidy is flagging this as an unchecked use of a std::optional:
if (is_interleaved_ramp(mul->a, scope, result) &&
(b = as_const_int(mul->b))) {
result->base = simplify(result->base * (int)(*b));
... that's checked, right?
We also have it complaining about this:
internal_assert(event);
if (*event == halide_trace_begin_realization || *event == halide_trace_end_realization)
because it doesn't see the assert as checking. Perhaps I should just disable that clang-tidy check.
A lot of this code was pre C++-17, and could be improved using std::optional. This would have avoided #8482 and arguably the bug underlying #8469