|
66 | 66 |
|
67 | 67 | // The third value provided to the macro specifies information about attributes |
68 | 68 | // of the function. These must be kept in sync with the predicates in the |
69 | | -// Builtin::Context class. Currently we have: |
| 69 | +// Builtin::Context class. Note: In the descriptions below, {num} is a |
| 70 | +// placeholder for an integer. Currently we have: |
70 | 71 | // n -> nothrow |
71 | 72 | // r -> noreturn |
72 | 73 | // U -> pure |
|
82 | 83 | // h -> this function requires a specific header or an explicit declaration. |
83 | 84 | // i -> this is a runtime library implemented function without the |
84 | 85 | // '__builtin_' prefix. It will be implemented in compiler-rt or libgcc. |
85 | | -// p:N: -> this is a printf-like function whose Nth argument is the format |
86 | | -// string. |
87 | | -// P:N: -> similar to the p:N: attribute, but the function is like vprintf |
88 | | -// in that it accepts its arguments as a va_list rather than |
89 | | -// through an ellipsis |
90 | | -// s:N: -> this is a scanf-like function whose Nth argument is the format |
91 | | -// string. |
92 | | -// S:N: -> similar to the s:N: attribute, but the function is like vscanf |
93 | | -// in that it accepts its arguments as a va_list rather than |
94 | | -// through an ellipsis |
| 86 | +// p:{num}: -> this is a printf-like function whose {num}th argument is the |
| 87 | +// format string. |
| 88 | +// P:{num}: -> similar to the p:{num}: attribute, but the function is like |
| 89 | +// vprintf in that it accepts its arguments as a va_list rather than |
| 90 | +// through an ellipsis |
| 91 | +// s:{num}: -> this is a scanf-like function whose {num}th argument is the |
| 92 | +// format string. |
| 93 | +// S:{num}: -> similar to the s:{num}: attribute, but the function is like |
| 94 | +// vscanf in that it accepts its arguments as a va_list rather than |
| 95 | +// through an ellipsis |
95 | 96 | // e -> const, but only when -fno-math-errno and FP exceptions are ignored |
96 | 97 | // g -> const when FP exceptions are ignored |
97 | 98 | // j -> returns_twice (like setjmp) |
98 | 99 | // u -> arguments are not evaluated for their side-effects |
99 | | -// V:N: -> requires vectors of at least N bits to be legal |
100 | | -// C<N,M_0,...,M_k> -> callback behavior: argument N is called with argument |
101 | | -// M_0, ..., M_k as payload |
| 100 | +// V:{num}: -> requires vectors of at least {num} bits to be legal |
| 101 | +// C<{num},M_0,...,M_k> -> callback behavior: argument {num} is called with |
| 102 | +// argument M_0, ..., M_k as payload |
102 | 103 | // z -> this is a function in (possibly-versioned) namespace std |
103 | 104 | // E -> this function can be constant evaluated by Clang frontend |
104 | 105 | // G -> this is a C++20 consteval function |
0 commit comments