bolt/deps/llvm-18.1.8/clang/test/SemaCXX/attr-unsafe-buffer-usage.cpp
2025-02-14 19:21:04 +01:00

6 lines
284 B
C++

// RUN: %clang_cc1 -fsyntax-only -verify %s
// Function annotations.
[[clang::unsafe_buffer_usage]]
void f(int *buf, int size);
void g(int *buffer [[clang::unsafe_buffer_usage("buffer")]], int size); // expected-warning {{'unsafe_buffer_usage' attribute only applies to functions}}