Szelethus added inline comments.

================
Comment at: clang/lib/Frontend/FrontendActions.cpp:501
+
+    if (const auto *Decl = dyn_cast<TagDecl>(NamedTemplate)) {
+      if (const auto *R = dyn_cast<RecordDecl>(Decl)) {
----------------
Szelethus wrote:
> martong wrote:
> > martong wrote:
> > > Should this handle `EnumDecl`s as well? An enum declaration itself cannot 
> > > be a primary template, however, it can be 1) a member of a specialization 
> > > of a templated class 2)  an instantiation of a member enumeration of a 
> > > class template specialization.
> > > 
> > > 
> > Should this handle variable templates (VarTemplateDecl) as well? Or it  is 
> > not possible to have unnamed variable templates?
> `EnumDecl` is a subclass of `TagDecl`, unless I misunderstood what you meant?
Right now, yes, it seems to that unnamed variable templates are not a thing.


================
Comment at: clang/lib/Frontend/FrontendActions.cpp:501-510
+    if (const auto *Decl = dyn_cast<TagDecl>(NamedTemplate)) {
+      if (const auto *R = dyn_cast<RecordDecl>(Decl)) {
+        if (R->isLambda()) {
+          OS << "lambda at ";
+          Decl->getLocation().print(OS, TheSema.getSourceManager());
+          return;
+        }
----------------
martong wrote:
> martong wrote:
> > Should this handle `EnumDecl`s as well? An enum declaration itself cannot 
> > be a primary template, however, it can be 1) a member of a specialization 
> > of a templated class 2)  an instantiation of a member enumeration of a 
> > class template specialization.
> > 
> > 
> Should this handle variable templates (VarTemplateDecl) as well? Or it  is 
> not possible to have unnamed variable templates?
`EnumDecl` is a subclass of `TagDecl`, unless I misunderstood what you meant?


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

https://reviews.llvm.org/D115521

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

Reply via email to