Allow a space between a colon and subsequent opening bracket. This sequence may occur in inline assembler statements like asm( "ldr %[out], [%[in]]\n\t" : [out] "=r" (ret) : [in] "r" (addr) );
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -4089,7 +4089,7 @@ sub process { · 4088 unmodified lines | ||
| 4089 | 4089 | my ($where, $prefix) = ($-[1], $1); |
| 4090 | 4090 | if ($prefix !~ /$Type\s+$/ && |
| 4091 | 4091 | ($where != 0 || $prefix !~ /^.\s+$/) && |
| 4092 | − $prefix !~ /[{,]\s+$/) { | |
| 4092 | + $prefix !~ /[{,:]\s+$/) { | |
| 4093 | 4093 | if (ERROR("BRACKET_SPACE", |
| 4094 | 4094 | "space prohibited before open square bracket '['\n" . $herecurr) && |
| 4095 | 4095 | $fix) { |