================
@@ -59,3 +59,10 @@ void foo() {
   f<int>(0); // expected-note {{in instantiation of function template 
specialization 'GH26612::f<int>' requested here}}
 }
 } // namespace GH26612
+
+void test_function_pointer(
+    char *(*member)(char *) __attribute__((alloc_align(1)))); // 
expected-error {{'alloc_align' attribute argument may only refer to a function 
parameter of integer type}}
----------------
AaronBallman wrote:

```suggestion
    char *(*member)(char *) __attribute__((alloc_align(1)))); // expected-error 
{{'alloc_align' attribute argument may only refer to a function parameter of 
integer type}}
    char * (*another_member)(int) __attribute___((alloc_align(1))); // ok
```

https://github.com/llvm/llvm-project/pull/210871
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to