================
@@ -0,0 +1,7 @@
+// REQUIRES: bpf-registered-target
+// RUN: %clang_cc1 %s -triple bpf -verify
+
+__attribute__((bpf_fastcall)) int var; // expected-warning {{'bpf_fastcall' 
attribute only applies to functions and function pointers}}
+
+__attribute__((bpf_fastcall)) void func();
+__attribute__((bpf_fastcall(1))) void func_invalid(); // expected-error 
{{'bpf_fastcall' attribute takes no arguments}}
----------------
AaronBallman wrote:

Can you also add a test applying it to a function pointer, with some tests 
showing that this attribute is not part of the type (so there's no pointer 
mismatches)?

If you have to care about C++ member functions, a test for that would be useful 
as well (and a codegen test too).

https://github.com/llvm/llvm-project/pull/101228
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to