aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/attr-unsafe-buffer-usage.cpp
blob: cab67784d90756742166097308764eff2b6fed78 (plain)
1
2
3
4
5
6
// 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 {{'clang::unsafe_buffer_usage' attribute only applies to functions}}