[llvm-branch-commits] [AllocToken, Clang] Infer type hints from sizeof expressions and casts (PR #156841)

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Oct 3 00:01:13 PDT 2025


================
@@ -10,7 +10,7 @@ typedef __typeof(sizeof(int)) size_t;
 void *malloc(size_t size);
 
 // CHECK-LABEL: @test_malloc(
-// CHECK: call{{.*}} ptr @__alloc_token_malloc(i64 noundef 4, i64 0)
+// CHECK: call{{.*}} ptr @__alloc_token_malloc(i64 noundef 4, i64 2689373973731826898){{.*}} !alloc_token [[META_INT:![0-9]+]]
----------------
zmodem wrote:

nit: Use a regex instead of hard-coding the token here and in alloc-token-nonlibcalls.c?

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


More information about the llvm-branch-commits mailing list