mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 13:53:31 +01:00
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.
This commit is contained in:
parent
99a5aecbc7
commit
f39ba52029
@ -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_]+\(/) {
|
||||
|
Loading…
Reference in New Issue
Block a user