diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-01-10 15:32:34 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-02-06 14:54:04 -0500 |
commit | f39ba52029c946304cc5a67fa93ca9aab10b2941 (patch) | |
tree | 709fed46a213a2616751835cc23bcb839a457ab9 /scripts/maint | |
parent | 99a5aecbc779985629abce22dfc00a4e9d6ccb9e (diff) | |
download | tor-f39ba52029c946304cc5a67fa93ca9aab10b2941.tar.gz tor-f39ba52029c946304cc5a67fa93ca9aab10b2941.zip |
checkSpace: be more careful about bad function headers.
Previously we would forbid macro indentations like this:
FOO({
int x;
})
But clang-format sometimes generates those.
Diffstat (limited to 'scripts/maint')
-rwxr-xr-x | scripts/maint/checkSpace.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/maint/checkSpace.pl b/scripts/maint/checkSpace.pl index bf1c69e00a..27615f910c 100755 --- a/scripts/maint/checkSpace.pl +++ b/scripts/maint/checkSpace.pl @@ -208,7 +208,7 @@ for my $fn (@ARGV) { ($fn !~ /\.h$/ && /^[a-zA-Z0-9_]/ && ! /^(?:const |static )*(?:typedef|struct|union)[^\(]*$/ && ! /= *\{$/ && ! /;$/) && ! /^[a-zA-Z0-9_]+\s*:/) { - if (/.\{$/){ + if (/[^,\s]\s*\{$/){ msg "fn() {:$fn:$.\n"; $in_func_head = 0; } elsif (/^\S[^\(]* +\**[a-zA-Z0-9_]+\(/) { |