New diagnostics were added for unreachable generic selection expression associations in ca75ac5f04f269def97e6844c2f5c9596b29c84c, but it did not account for a difference in behavior between C and C++ regarding lvalue to rvalue conversions. So we would issue diagnostics about a selection being unreachable and then reach it. This corrects the diagnostic behavior in that case.
Details
- Reviewers
erichkeane tahonermann aeubanks - Group Reviewers
Restricted Project - Commits
- rG47b8424a533d: Correct the diagnostic behavior for unreachable _Generic associations in C++
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Took me a bit to get the prose, but I think I got it now. PERHAPS there is use to 'finish the thought' on the outcome there? Either way, LGTM.
clang/lib/Sema/SemaExpr.cpp | ||
---|---|---|
1699 | This seems like it is a sentence short (or perhaps I'm a few synapses short?). The fallout from these rules is that "Non-class-types" never have qualifiers, thus cannot match a qualified type, but a class-type can, because it keeps its qualifiers? |
clang/lib/Sema/SemaExpr.cpp | ||
---|---|---|
1699 |
Correct for C++ -- the basic idea is that in C, all qualifiers are stripped, and in C++, only non-class type types have their qualifiers stripped. I'll update the comment when landing. |
This seems like it is a sentence short (or perhaps I'm a few synapses short?).
The fallout from these rules is that "Non-class-types" never have qualifiers, thus cannot match a qualified type, but a class-type can, because it keeps its qualifiers?