llvm-project/clang/test/SemaCXX/noescape-attr.cpp
Amr Hesham 562999a9f3
[clang] assume_aligned incorrectly diagnoses a dependent return type (#111573)
Fix `assume_aligned` incorrectly diagnoses a dependent return type

Fixes: #111563
2024-10-10 06:47:48 +02:00

7 lines
260 B
C++

// RUN: %clang_cc1 -fsyntax-only -verify %s
template<typename T>
void test1(T __attribute__((noescape)) arr, int size);
// expected-warning@+1 {{'noescape' attribute only applies to pointer arguments}}
void test2(int __attribute__((noescape)) arr, int size);