clang/test/SemaCXX/attr-cfi-canonical-jump-table.cpp
raw| 1 | // RUN: %clang_cc1 -triple x86_64-unknown-linux -fsyntax-only -verify %s |
| 2 | |
| 3 | __attribute__((cfi_canonical_jump_table)) void fdecl(); |
| 4 | |
| 5 | __attribute__((cfi_canonical_jump_table)) void f() {} |
| 6 | |
| 7 | struct S { |
| 8 | __attribute__((cfi_canonical_jump_table)) void f() {} |
| 9 | }; |
| 10 | |
| 11 | __attribute__((cfi_canonical_jump_table)) int i; // expected-error {{'cfi_canonical_jump_table' attribute only applies to functions}} |