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