[libcxx-commits] [clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 23 03:03:26 PDT 2024


================
@@ -1599,13 +1599,66 @@ createTypePackElementParameterList(const ASTContext &C, DeclContext *DC) {
                                        nullptr);
 }
 
+static TemplateParameterList *createCommonTypeList(const ASTContext &C,
+                                                   DeclContext *DC) {
+  // class... Args
+  auto *Args = TemplateTypeParmDecl::Create(
+      C, DC, {}, {}, /*Depth=*/1, /*Position=*/0, /*Id=*/nullptr,
----------------
Sirraide wrote:

For `{}` arguments, please include a comment like you did for the integers and `nullptr` (or alternatively, in this particular case, since they’re source locations, I’d probably just use `SourceLocation()` on its own; then you don’t need the comments).

The same applies to all the calls below ofc.

https://github.com/llvm/llvm-project/pull/99473


More information about the libcxx-commits mailing list