[PATCH] D15709: [X86] Support 'interrupt' attribute for x86

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 29 02:48:32 PST 2015


ABataev marked 2 inline comments as done.

================
Comment at: test/Sema/attr-x86-interrupt.c:54
@@ +53,3 @@
+  foo8((int *)argv);       // expected-error {{interrupt service routine can't be used directly}}
+  return 0;
+}
----------------
aaron.ballman wrote:
> I'd like to see a test like:
> ```
> __attribute__((interrupt)) void foo8(int *a) {}
> 
> void g(void (*fp)(int *));
> 
> void f() {
>   g(foo8);
> }
> ```
> as I think this is supposed to diagnose. It might also be good to have a similar test using templates in C++.
Checked again. I did not look at the code for a long time and just forgot that the functions cannot be called, but you can take their address. Modified the message and the code itself for better check.


http://reviews.llvm.org/D15709





More information about the cfe-commits mailing list