1 // RUN: %clang_cc1 -verify -S -emit-llvm -o- %s -isystem %S -DWITH_DECL | FileCheck --check-prefix=CHECK-WITH-DECL %s
2 // RUN: %clang_cc1 -verify -S -emit-llvm -o- %s -isystem %S -UWITH_DECL | FileCheck --check-prefix=CHECK-NO-DECL %s
3 // RUN: %clang_cc1 -verify -S -emit-llvm -o- %s -isystem %S -disable-llvm-passes -DWITH_SELF_REFERENCE_DECL | FileCheck --check-prefix=CHECK-SELF-REF-DECL %s
5 // CHECK-WITH-DECL-NOT: @llvm.memcpy
6 // CHECK-NO-DECL: @llvm.memcpy
7 // CHECK-SELF-REF-DECL-LABEL: define {{.*}}ptr @memcpy.inline
8 // CHECK-SELF-REF-DECL: @llvm.memcpy.{{.*}}(
10 #include <memcpy-nobuiltin.inc>
11 void test(void *dest
, void const *from
, size_t n
) {
12 memcpy(dest
, from
, n
);
14 static char buffer
[1];
15 memcpy(buffer
, from
, 2); // expected-warning {{'memcpy' will always overflow; destination buffer has size 1, but size argument is 2}}