aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Analysis/analyzer-stats.c2
-rwxr-xr-xtools/scan-build/scan-build17
2 files changed, 10 insertions, 9 deletions
diff --git a/test/Analysis/analyzer-stats.c b/test/Analysis/analyzer-stats.c
index 9eeaade793..63073b7e40 100644
--- a/test/Analysis/analyzer-stats.c
+++ b/test/Analysis/analyzer-stats.c
@@ -2,7 +2,7 @@
int foo();
-int test() { // expected-warning{{Total CFGBlocks}}
+int test() { // expected-warning-re{{test -> Total CFGBlocks: [0-9]+ \| Unreachable CFGBlocks: 0 \| Exhausted Block: no \| Empty WorkList: yes}}
int a = 1;
a = 34 / 12;
diff --git a/tools/scan-build/scan-build b/tools/scan-build/scan-build
index 4965dbdc7a..ff82e129d1 100755
--- a/tools/scan-build/scan-build
+++ b/tools/scan-build/scan-build
@@ -284,10 +284,11 @@ sub UpdateInFilePath {
sub AddStatLine {
my $Line = shift;
my $Stats = shift;
+ my $File = shift;
print $Line . "\n";
- my $Regex = qr/(.*?)\ :\ (.*?)\ ->\ Total\ CFGBlocks:\ (\d+)\ \|\ Unreachable
+ my $Regex = qr/(.*?)\ ->\ Total\ CFGBlocks:\ (\d+)\ \|\ Unreachable
\ CFGBlocks:\ (\d+)\ \|\ Exhausted\ Block:\ (yes|no)\ \|\ Empty\ WorkList:
\ (yes|no)/x;
@@ -297,12 +298,12 @@ sub AddStatLine {
# Create a hash of the interesting fields
my $Row = {
- Filename => $1,
- Function => $2,
- Total => $3,
- Unreachable => $4,
- Aborted => $5,
- Empty => $6
+ Filename => $File,
+ Function => $1,
+ Total => $2,
+ Unreachable => $3,
+ Aborted => $4,
+ Empty => $5
};
# Add them to the stats array
@@ -383,7 +384,7 @@ sub ScanFile {
# Don't add internal statistics to the bug reports
if ($BugCategory =~ /statistics/i) {
- AddStatLine($BugDescription, $Stats);
+ AddStatLine($BugDescription, $Stats, $BugFile);
return;
}