[PATCH] D146719: [Clang] Improve diagnostics when using a concept as template argument

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 24 09:09:34 PDT 2023


aaron.ballman added a comment.

Want to add a release note for this as well?



================
Comment at: clang/lib/Parse/Parser.cpp:1886-1889
+  case Sema::NC_Concept:
   case Sema::NC_VarTemplate:
   case Sema::NC_FunctionTemplate:
   case Sema::NC_UndeclaredTemplate: {
----------------
Would this change make sense, to validate that we're still consuming the token in these three cases? I think it was an assumption we made previously, but it's not clear to me if the code used to consume something other than `<` as well.


================
Comment at: clang/test/Parser/cxx-template-template-recovery.cpp:5
+  template <typename T>
+  concept C1 = true; //expected-note {{here}}
+
----------------
Totally minor nit, but the same should be changed throughout the file.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146719/new/

https://reviews.llvm.org/D146719



More information about the cfe-commits mailing list