(source: string)
| 1099 | */ |
| 1100 | const C_TRAILING_PARAM_ATTR_RE = /\b([A-Za-z_]\w*)([ \t]+)([A-Z][A-Z0-9_]{2,})(?=[ \t]*[,)])/g; |
| 1101 | export function blankCTrailingParamAttrMacros(source: string): string { |
| 1102 | if (!C_TRAILING_PARAM_ATTR_RE.test(source)) { |
| 1103 | C_TRAILING_PARAM_ATTR_RE.lastIndex = 0; |
| 1104 | return source; |
| 1105 | } |
| 1106 | C_TRAILING_PARAM_ATTR_RE.lastIndex = 0; |
| 1107 | return source.replace( |
| 1108 | C_TRAILING_PARAM_ATTR_RE, |
| 1109 | (_m, name: string, ws: string, macro: string) => name + ws + ' '.repeat(macro.length) |
| 1110 | ); |
| 1111 | } |
| 1112 | |
| 1113 | /** |
| 1114 | * Blank the Linux-kernel/sparse declaration-annotation macros — `static int |
no outgoing calls
no test coverage detected