Diagnostic for constraint satisfication failure can provide irrelevant information #54678
Labels
clang:diagnostics
New/improved warning or error message in Clang, but not in clang-tidy or static analyzer
Uh oh!
There was an error while loading. Please reload this page.
Here's an example:
The calls to
foo(42)
andbar(42L)
should (and do) fail, because neitherint
norlong
satisfyFalse
.clang currently emits this error for
foo(42)
Which is good.
But it emits this error for
bar(42L)
:This notes both that
long
does not satisfyFalse
but also thatlong
does not satisfyIrrelevant
. ButIrrelevant
is irrelevant - that part of the disjunction holds (becauselong
satisfiesTrue
), so that is not the reason this fails. It's just an irrelevant diagnostic to the user -- which clang (correctly) doesn't provide in thefoo
case.The text was updated successfully, but these errors were encountered: