[PATCH] D53847: [C++2a] P0634r3: Down with typename!

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 22 09:19:58 PDT 2022


shafik added a subscriber: aaron.ballman.
shafik added a comment.

I made mostly small comments but I think @aaron.ballman and/or @erichkeane should take a look as well.



================
Comment at: clang/lib/Parse/ParseDecl.cpp:3434-3435
                                      &SS) &&
-          isConstructorDeclarator(/*Unqualified*/ false))
+          isConstructorDeclarator(/*Unqualified*/ false,
+                                  /*DeductionGuide*/ false,
+                                  DS.isFriendSpecified()))
----------------



================
Comment at: clang/lib/Parse/ParseDecl.cpp:5592
+bool Parser::isConstructorDeclarator(bool IsUnqualified, bool DeductionGuide,
+                                     bool IsFriend) {
   TentativeParsingAction TPA(*this);
----------------
Instead of adding yet another `bool` flag maybe we can consider using something like `enum isFriend : bool {No, Yes}`.

I am sure @aaron.ballman will want to chime in here as well.


================
Comment at: clang/lib/Parse/ParseTemplate.cpp:20
 #include "clang/Sema/DeclSpec.h"
+#include "clang/Sema/Lookup.h"
 #include "clang/Sema/ParsedTemplate.h"
----------------
Do we still need this?


================
Comment at: clang/lib/Parse/ParseTemplate.cpp:1450
                 TemplateArgsPtr, TemplateId->RAngleLoc,
-                /*IsCtorOrDtorName*/ false, IsClassName);
+                /*IsCtorOrDtorName*/ false, IsClassName, AllowImplicitTypename);
   // Create the new "type" annotation token.
----------------



================
Comment at: clang/lib/Sema/Sema.cpp:51
 #include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/ADT/SmallSet.h"
 #include "llvm/Support/TimeProfiler.h"
----------------
Do we need this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D53847



More information about the cfe-commits mailing list