-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Pointless -Wundefined-internal warning from concept checks #61566
Comments
@llvm/issue-subscribers-c-20 |
Note, gcc also produces a diagnostic for this: https://godbolt.org/z/E7Yfv9css I am not sure if this is expected though CC @erichkeane @royjacobson |
This seems to just be a problem with our diagnostic, not concept specific. I'm guessing it isn't considering the type of 'used' in some way. I wouldn't expect the 'internal linkage without definition' to be a problem if only used in a concept though, so I agree with Tim that this should likely not be sufficient to trigger it. However, I DO note that if you call t.begin inside the concept, it doesn't trigger the warning, so it is something to do with how we're evaluating the ::begin. |
@erichkeane poking around, we are considering an ODR-used, either because requires constraints use the wrong sort of context somewhere, or because we do not consider the case of a potentially evaluated context nested in an unevaluated context |
Ah, interesting! I wouldn't be surprised, we've noticed a few times already we had the context incorrect. I THINK we just fixed one recently. |
This is going to be super tricky to "fix", if at all possible. 1 - check whether To silence the warning, we would need to track that the point of instantiation was in an unevaluated context. |
Here, I'm just trying to check the concept; nothing is actually calling
::begin
orR::begin
. Yet clang warns:The text was updated successfully, but these errors were encountered: