Debian Codegraph @

clang/test/CodeGen/attr-malloc.c

raw
1 // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s
2
3 int *Mem;
4 void dealloc(int*);
5
6 __attribute__((malloc)) int *MallocFunc(){ return Mem;}
7 // CHECK: define[[BEFORE:.*]] noalias[[AFTER:.*]]@MallocFunc
8 // Ensure these two do not generate noalias here.
9 __attribute__((malloc(dealloc))) int *MallocFunc2(){ return Mem;}
10 // CHECK: define[[BEFORE]][[AFTER]]@MallocFunc2
11 __attribute__((malloc(dealloc, 1))) int *MallocFunc3(){ return Mem;}
12 // CHECK: define[[BEFORE]][[AFTER]]@MallocFunc3