changyu added a comment.

I don't have commit privilege. And also there's one more problem we might want 
to address first.

Thank you.



================
Comment at: lib/Parse/ParseTemplate.cpp:181
+    TemplateParameterList *TPL = ParamLists[0];
+    if (TPL->getLAngleLoc().getLocWithOffset(1) == TPL->getRAngleLoc()) {
+      Diag(TPL->getTemplateLoc(),
----------------
There's one problem here.

​I added this `if` in attempt to catch the following case (but it's wrong)
```
        ​template<> concept D1 = true;  // expected-error {{expected template 
parameter}}
```
The problem is I'm not sure how to differentiate between the above situation 
and the following
```
        ​template<concept T> concept D1 = true; // expected-error {{expected 
template parameter}}
```
Both have an empty template parameter list​. The latter case has diagnostic 
printed by `ParseNonTypeTemplateParameter` while the former has not (so we try 
to catch it here).

What should we do?



https://reviews.llvm.org/D40381



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to