summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-01-10 15:32:34 -0500
committerNick Mathewson <nickm@torproject.org>2020-02-06 14:54:04 -0500
commitf39ba52029c946304cc5a67fa93ca9aab10b2941 (patch)
tree709fed46a213a2616751835cc23bcb839a457ab9 /scripts
parent99a5aecbc779985629abce22dfc00a4e9d6ccb9e (diff)
downloadtor-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')
-rwxr-xr-xscripts/maint/checkSpace.pl2
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_]+\(/) {