[llvm-branch-commits] [Clang][Sema] Add __builtin_infer_alloc_token() declaration and semantic checks (PR #163638)

Florian Mayer via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Oct 17 16:51:21 PDT 2025


================
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++23 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++23 -fsyntax-only -verify %s -fexperimental-new-constant-interpreter
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++23 -fsyntax-only -verify %s -falloc-token-mode=typehash -DMODE_TYPEHASH
+
+#if !__has_builtin(__builtin_infer_alloc_token)
+#error "missing __builtin_infer_alloc_token"
+#endif
+
+void negative_tests() {
----------------
fmayer wrote:

can we add tests for templates? as this is specifically handled in the check function?

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


More information about the llvm-branch-commits mailing list