[libcxx-commits] [PATCH] D133262: [clang] Represent __make_integer_seq as alias template in the AST

Erich Keane via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 6 06:16:55 PDT 2022


erichkeane added inline comments.


================
Comment at: clang/lib/AST/DeclTemplate.cpp:257
+    return true;
+  case TemplateDecl::BuiltinTemplate: {
+    const auto *BT = cast<BuiltinTemplateDecl>(this);
----------------
This seems strange to me that ONLY this one builtin is what makes a template a 'type alias'.  This needs to have a more descriptive name here, IMO.


================
Comment at: clang/lib/AST/DeclTemplate.cpp:262
+  }
+  default:;
+  };
----------------
The semicolon after default is bizarre/unnecessary.  That said, I'd suggest just making the 'default' case be 'return false'.


================
Comment at: clang/lib/Sema/SemaTemplate.cpp:3531
     // synthetic template argument list.
-    SyntheticTemplateArgs.addArgument(TemplateArgs[1]);
+    auto *TTPD =
+        cast<TemplateTypeParmDecl>(BTD->getTemplateParameters()->getParam(1));
----------------
Can you update the comment here ot accurately describe what is going on below?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133262



More information about the libcxx-commits mailing list