[PATCH] D12435: [Concepts] Add diagnostic; invalid specifier on function or variable concept declaration
Hubert Tong via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 28 15:03:44 PDT 2015
hubert.reinterpretcast added inline comments.
================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:1982
@@ -1981,1 +1981,3 @@
"function concept cannot have exception specification">;
+def err_concept_decl_invalid_sepcifiers : Error<
+ "%select{variable|function}0 concept cannot be declared with "
----------------
nwilson wrote:
> hubert.reinterpretcast wrote:
> > The wording seems unwieldy. There are a number of messages of the form:
> >
> > > [ ... ] cannot be declared '<blah>'
> >
> > Perhaps something along those lines would work here?
> >
> > btw, there's a typo in the message identifier.
> 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:
> "%select{variable|function}0 concept cannot be declared %select{thread_local|constexpr|inline}1"
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.
http://reviews.llvm.org/D12435
More information about the cfe-commits
mailing list