-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clang] New static_assert message is sometimes redundant #57906
Comments
@llvm/issue-subscribers-good-first-issue |
@llvm/issue-subscribers-clang-frontend |
The code already tries to minimize unnecessary notes, but this seems to be missing. The relevant function is |
I poked around this one little bit and the fact that the note is not emitted for conjunction seems to be a coincidence. In case of conjunction |
Hello @tbaederr @cjdb , |
I think that is the output @cjdb expected, but we can't judge if your approach is the right one without seeing a patch. |
@Krishna-13-cyber , are you still working on this? |
Yes, I have solved this and has been merged recently! |
Closing this then. |
The new
static_assert
message is great, there are some simple messages where an expansion isn't particularly helpful.For example
will give us
The note isn't necessary, since the error implies that the expression will be
false or false
. I noticed that if we change the expression to a conjunction, we get a simpler message, so it looks like the machinery might already be present.We should---on a best effort basis---aim to eliminate expansions that don't add value to minimise user frustration (this will give us slightly more room to have longer diagnostics elsewhere).
The text was updated successfully, but these errors were encountered: