[clang] [Clang] Permit noescape on non-pointer types (PR #117344)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 2 06:47:23 PST 2024
================
@@ -1,7 +1,12 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// expected-no-diagnostics
+
template<typename T>
void test1(T __attribute__((noescape)) arr, int size);
-// expected-warning at +1 {{'noescape' attribute only applies to pointer arguments}}
-void test2(int __attribute__((noescape)) arr, int size);
\ No newline at end of file
+void test2(int __attribute__((noescape)) arr, int size);
+
+#if !__has_feature(attribute_noescape_nonpointer)
----------------
erichkeane wrote:
Got it, thanks for clarifying.
https://github.com/llvm/llvm-project/pull/117344
More information about the cfe-commits
mailing list