[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / noescape-attr.cpp
blob78dc4f07ffef8717ffdb0c2a4314f3e87d3205fe
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 template<typename T>
4 void test1(T __attribute__((noescape)) arr, int size);
6 // expected-warning@+1 {{'noescape' attribute only applies to pointer arguments}}
7 void test2(int __attribute__((noescape)) arr, int size);