mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 09:26:41 +00:00

Revert commit 23457964392d00fc872fa6021763859024fb38da, and re-land with a new flag "-Wunsafe-buffer-usage-in-libc-call" for the new warning. (rdar://117182250)
7 lines
326 B
C++
7 lines
326 B
C++
// RUN: %clang_cc1 -std=c++20 -Wunsafe-buffer-usage -fsafe-buffer-usage-suggestions -verify %s
|
|
|
|
typedef unsigned __darwin_size_t;
|
|
typedef __darwin_size_t size_t;
|
|
#define bzero(s, n) __builtin_bzero(s, n)
|
|
void __nosan_bzero(void *dst, size_t sz) { bzero(dst, sz); } // expected-warning{{function '__builtin_bzero' is unsafe}}
|