blob: b9684f0b46c1e983ddacfdd09eb2e3ba8b004944 [file] [log] [blame]
Tim Northovera484bc02013-10-01 14:34:25 +00001// RUN: %clang_cc1 %s -triple arm-apple-darwin -verify -fsyntax-only
Oliver Stannard97a3c352016-09-15 08:55:41 +00002// RUN: %clang_cc1 %s -triple thumb-apple-darwin -verify -fsyntax-only
3// RUN: %clang_cc1 %s -triple armeb-none-eabi -verify -fsyntax-only
4// RUN: %clang_cc1 %s -triple thumbeb-none-eabi -verify -fsyntax-only
Tim Northovera484bc02013-10-01 14:34:25 +00005
Aaron Ballman05e420a2014-01-02 21:26:14 +00006__attribute__((interrupt(IRQ))) void foo() {} // expected-error {{'interrupt' attribute requires a string}}
Tim Northovera484bc02013-10-01 14:34:25 +00007__attribute__((interrupt("irq"))) void foo1() {} // expected-warning {{'interrupt' attribute argument not supported: irq}}
8
Aaron Ballman05e420a2014-01-02 21:26:14 +00009__attribute__((interrupt("IRQ", 1))) void foo2() {} // expected-error {{'interrupt' attribute takes no more than 1 argument}}
Tim Northovera484bc02013-10-01 14:34:25 +000010
11__attribute__((interrupt("IRQ"))) void foo3() {}
12__attribute__((interrupt("FIQ"))) void foo4() {}
13__attribute__((interrupt("SWI"))) void foo5() {}
14__attribute__((interrupt("ABORT"))) void foo6() {}
15__attribute__((interrupt("UNDEF"))) void foo7() {}
16
17__attribute__((interrupt)) void foo8() {}
18__attribute__((interrupt())) void foo9() {}
19__attribute__((interrupt(""))) void foo10() {}