blob: d34265428193488f1988f42f083adff7e05af0d5 [file] [log] [blame]
// RUN: %clang_cc1 %s -fblocks -verify -fsyntax-only
#if !__has_attribute(noescape)
# error "missing noescape attribute"
#endif
int *global_var __attribute((noescape)); // expected-warning{{'noescape' attribute only applies to parameters}}
void foo(__attribute__((noescape)) int *int_ptr,
__attribute__((noescape)) int (^block)(int),
__attribute((noescape)) int integer) { // expected-warning{{'noescape' attribute only applies to pointer arguments}}
}