[PATCH] D40705: [Parser] Diagnose storage classes in template parameter declarations

Faisal Vali via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 17 13:11:58 PST 2017


faisalv accepted this revision.
faisalv added a comment.
This revision is now accepted and ready to land.

Otherwise, I think this looks good enough to commit.

Do you have commit access? If not, let me know when you're ready for me to commit it on your behalf ...

Thank you for fixing this!



================
Comment at: include/clang/Basic/DiagnosticParseKinds.td:671
 
+def err_storage_class_template_parameter : Error<
+  "storage class specified for template parameter %0">;
----------------
What about folding both of these diagnostics into one with something along these lines:
def err_storage_class_template_parameter : Error<
  "storage class specified for template parameter %select{|%1}0">;

And for no identifier, do << 0, and for the valid identifier case: do << 1 << ParamDecl.getIdentifier()


https://reviews.llvm.org/D40705





More information about the cfe-commits mailing list