[clang] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 27 06:23:25 PST 2025
================
@@ -0,0 +1,23 @@
+//===--- BuiltinTemplates.td - Clang builtin template aliases ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+class BuiltinTemplate<string prototype> {
+ string Prototype = prototype;
+}
+
+def __make_integer_seq : BuiltinTemplate<
+ "template <template <class T, T... Ints> class IntSeq, class T, T N>">;
----------------
erichkeane wrote:
I thought about this over the weekend. I really think that we want some sort of structures to define the template head here. The base needs a name, then we need a Type, an Non-Type, a Template-Template, and a Variadic (for now).
But having us try to parse this is really going to be error prone and difficult to extend.
https://github.com/llvm/llvm-project/pull/123736
More information about the cfe-commits
mailing list