Diagnose variable and function concept declarations when an invalid specifier appears
Details
- Reviewers
faisalv aaron.ballman • fraggamuffin rsmith hubert.reinterpretcast - Commits
- rG085b9ff6e257: [Concepts] Add diagnostic; invalid specifier on function or variable concept…
rC247194: [Concepts] Add diagnostic; invalid specifier on function or variable concept…
rL247194: [Concepts] Add diagnostic; invalid specifier on function or variable concept…
Diff Detail
Event Timeline
include/clang/Basic/DiagnosticSemaKinds.td | ||
---|---|---|
1982 | The wording seems unwieldy. There are a number of messages of the form:
Perhaps something along those lines would work here? btw, there's a typo in the message identifier. |
include/clang/Basic/DiagnosticSemaKinds.td | ||
---|---|---|
1982 | I'll fix the typo. Thanks. I can change the wording as well; I don't feel too strongly about it unless someone has a different opinion. Are you okay with the second select? So, it would be: |
include/clang/Basic/DiagnosticSemaKinds.td | ||
---|---|---|
1982 | Not sure if other people have an opinion, but the single quotes around, e.g., 'inline' would fit. For 'friend', the quoted version is terser (without quotes, it would be awkward). On that note, if we plan to use this message for the "friend" case, let's add it in the same order as the quoted portion of the TS now. |
Change the wording of diagnostic message and quote the invalid specifier. Add 'friend' as an invalid specifier and diagnose function concepts when 'friend' is specified. Reorder the list of invalid specifiers and corresponding checks in the code to match the TS.
The wording seems unwieldy. There are a number of messages of the form:
Perhaps something along those lines would work here?
btw, there's a typo in the message identifier.