xref: /illumos-gate/usr/src/tools/smatch/src/smatch_scripts/find_expanded_holes.pl (revision 856f710c9dc323b39da5935194d7928ffb99b67f)
1#!/usr/bin/perl
2
3use strict;
4
5my $cur_struct = "";
6my $printed = 0;
7
8while (<>) {
9    if ($_ =~ /^struct (\w+) {/) {
10	$cur_struct = $1;
11	$printed = 0;
12	next;
13    }
14    if ($_ =~ /.* hole,.*/ && !$printed) {
15	print "$cur_struct\n";
16	$printed = 1;
17    }
18}
19