|
| 1 | +// RUN: %idt -export-macro IDT_TEST_ABI %s 2>&1 | %FileCheck %s |
| 2 | + |
| 3 | +// CHECK: Functions.hh:[[@LINE+1]]:78: remark: unexported public interface 'function_1' |
| 4 | +__attribute__((always_inline)) [[deprecated("this function is deprecated")]] int function_1(int); |
| 5 | + |
| 6 | +// CHECK: Functions.hh:[[@LINE+1]]:59: remark: unexported public interface 'function_2' |
| 7 | +__attribute__((deprecated("this function is deprecated")))int function_2(int); |
| 8 | + |
| 9 | +// CHECK: Functions.hh:[[@LINE+1]]:55: remark: unexported public interface 'function_3' |
| 10 | +[[nodiscard]] __attribute__((noinline)) /* comment */ int function_3(int); |
| 11 | + |
| 12 | +// CHECK: Functions.hh:[[@LINE+1]]:73: remark: unexported public interface 'function_4' |
| 13 | +__attribute__((noinline)) [[deprecated("this function is deprecated")]] int function_4(int); |
| 14 | + |
| 15 | +// CHECK: Functions.hh:[[@LINE+2]]:15: remark: unexported public interface 'function_5' |
| 16 | +[[nodiscard]] __attribute__((deprecated("this function is deprecated"))) |
| 17 | +/* comment */ int function_5(int); |
| 18 | + |
| 19 | +// CHECK: Functions.hh:[[@LINE+2]]:1: remark: unexported public interface 'function_6' |
| 20 | +[[nodiscard]] |
| 21 | +int function_6(int); |
| 22 | + |
| 23 | +// CHECK: Functions.hh:[[@LINE+3]]:1: remark: unexported public interface 'function_7' |
| 24 | +[[nodiscard]] [[deprecated("this function is deprecated")]] /* two line |
| 25 | + comment */ |
| 26 | +int function_7(int); |
| 27 | + |
| 28 | +// CHECK: Functions.hh:[[@LINE+2]]:15: remark: unexported public interface 'function_8' |
| 29 | +[[nodiscard]] // this is a comment |
| 30 | +/* comment */ int function_8(int); |
| 31 | + |
| 32 | +// CHECK: Functions.hh:[[@LINE+2]]:58: remark: unexported public interface 'function_9' |
| 33 | +[[nodiscard]] // this is a comment |
| 34 | +__attribute((deprecated("this function is deprecated"))) int function_9(int); |
| 35 | + |
| 36 | +// CHECK: Functions.hh:[[@LINE+1]]:21: remark: unexported public interface 'function_10' |
| 37 | +[[nodiscard]] const void *function_10(int); |
| 38 | + |
| 39 | +struct Class { |
| 40 | + // CHECK: Functions.hh:[[@LINE+1]]:49: remark: unexported public interface 'method_1' |
| 41 | + [[deprecated("this function is deprecated")]] int method_1(int); |
| 42 | + |
| 43 | + // CHECK: Functions.hh:[[@LINE+1]]:48: remark: unexported public interface 'method_2' |
| 44 | + [[deprecated("this function is deprecated")]]int method_2(int); |
| 45 | + |
| 46 | + // CHECK: Functions.hh:[[@LINE+1]]:31: remark: unexported public interface 'method_3' |
| 47 | + [[nodiscard]] /* comment */ int method_3(int); |
| 48 | + |
| 49 | + // CHECK: Functions.hh:[[@LINE+2]]:17: remark: unexported public interface 'method_4' |
| 50 | + [[nodiscard]] |
| 51 | + /* comment */ int method_4(int); |
| 52 | + |
| 53 | + // CHECK: Functions.hh:[[@LINE+2]]:3: remark: unexported public interface 'method_5' |
| 54 | + [[nodiscard]] |
| 55 | + int method_5(int); |
| 56 | + |
| 57 | + // CHECK: Functions.hh:[[@LINE+3]]:3: remark: unexported public interface 'method_6' |
| 58 | + [[nodiscard]] /* two line |
| 59 | + comment */ |
| 60 | + int method_6(int); |
| 61 | + |
| 62 | + // CHECK: Functions.hh:[[@LINE+2]]:3: remark: unexported public interface 'method_7' |
| 63 | + [[nodiscard]] // this is a comment |
| 64 | + int method_7(int); |
| 65 | + |
| 66 | + // CHECK: Functions.hh:[[@LINE+2]]:49: remark: unexported public interface 'method_8' |
| 67 | + [[nodiscard]] // this is a comment |
| 68 | + [[deprecated("this function is deprecated")]] int method_8(int); |
| 69 | +}; |
0 commit comments