checkSpace: don't treat an unindented label as starting a function.

This commit is contained in:
Nick Mathewson 2020-01-10 09:25:04 -05:00
parent 9feeb4cf97
commit c8fae6b5c8

View File

@ -207,7 +207,7 @@ for my $fn (@ARGV) {
if ($in_func_head || if ($in_func_head ||
($fn !~ /\.h$/ && /^[a-zA-Z0-9_]/ && ($fn !~ /\.h$/ && /^[a-zA-Z0-9_]/ &&
! /^(?:const |static )*(?:typedef|struct|union)[^\(]*$/ && ! /^(?:const |static )*(?:typedef|struct|union)[^\(]*$/ &&
! /= *\{$/ && ! /;$/)) { ! /= *\{$/ && ! /;$/) && ! /^[a-zA-Z0-9_]+\s*:/) {
if (/.\{$/){ if (/.\{$/){
msg "fn() {:$fn:$.\n"; msg "fn() {:$fn:$.\n";
$in_func_head = 0; $in_func_head = 0;