[clang] [Clang] Add BuiltinTemplates.td to generate code for builtin templates (PR #123736)

Nikolas Klauser via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 25 03:08:03 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>">;
----------------
philnik777 wrote:

Do you think it would be better to give the templates an internal name to be more consistent?

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


More information about the cfe-commits mailing list