From 32f41f23085850f5fdd788e7b74b86d3544a3a30 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 23 May 2014 16:40:46 +0000 Subject: List the function/method name in the index page of scan-build git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209526 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/scan-build/scan-build | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/scan-build/scan-build b/tools/scan-build/scan-build index 7502a42432..c444249c0a 100755 --- a/tools/scan-build/scan-build +++ b/tools/scan-build/scan-build @@ -368,6 +368,7 @@ sub ScanFile { my $BugType = ""; my $BugFile = ""; + my $BugFunction = ""; my $BugCategory = ""; my $BugDescription = ""; my $BugPathLength = 1; @@ -395,6 +396,10 @@ sub ScanFile { elsif (/$/) { $BugDescription = $1; } + elsif (/$/) { + $BugFunction = $1; + } + } close(IN); @@ -409,7 +414,7 @@ sub ScanFile { return; } - push @$Index,[ $FName, $BugCategory, $BugType, $BugFile, $BugLine, + push @$Index,[ $FName, $BugCategory, $BugType, $BugFile, $BugFunction, $BugLine, $BugPathLength ]; } @@ -699,6 +704,7 @@ print OUT <Bug Group Bug Type ▾ File + Function/Method Line Path Length @@ -756,13 +762,17 @@ ENDTEXT } print OUT ""; + print OUT ""; + print OUT $row->[4]; + print OUT ""; + # Print out the quantities. - for my $j ( 4 .. 5 ) { + for my $j ( 5 .. 6 ) { print OUT "$row->[$j]"; } # Print the rest of the columns. - for (my $j = 6; $j <= $#{$row}; ++$j) { + for (my $j = 7; $j <= $#{$row}; ++$j) { print OUT "$row->[$j]" } -- cgit v1.2.3