From 32f41f23085850f5fdd788e7b74b86d3544a3a30 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 23 May 2014 16:40:46 +0000 Subject: [PATCH] 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 --- lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp | 4 ++++ tools/scan-build/scan-build | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp b/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp index 07a793e6ef..a2997739fe 100644 --- a/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp +++ b/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp @@ -215,6 +215,10 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D, os << "\n\n"; + os << "\n\n"; + + os << "\n\n"; + os << "\n\n"; 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]" } -- 2.40.0