3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 11:42:35 +01:00

compiler_vm: minor beautification of compiler diagnostic output

This commit is contained in:
Pragmatic Software 2014-03-01 14:42:08 +00:00
parent 80a7a82221
commit 4d0e23243b
2 changed files with 8 additions and 4 deletions

View File

@ -13,8 +13,8 @@ use warnings;
# These are set automatically by the build/commit script # These are set automatically by the build/commit script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 492, BUILD_REVISION => 493,
BUILD_DATE => "2014-02-27", BUILD_DATE => "2014-03-01",
}; };
1; 1;

View File

@ -932,6 +932,9 @@ if($output =~ m/^\s*$/) {
print FILE "$output\n"; print FILE "$output\n";
} }
$output =~ s/In file included from prog.c:\d+:\d+:\s*//msg;
$output =~ s/prog: prog.c:\d+: [^:]+: Assertion/Assertion/g;
unless(defined $got_paste or (defined $got_run and $got_run eq "paste")) { unless(defined $got_paste or (defined $got_run and $got_run eq "paste")) {
$output =~ s/ Line \d+ ://g; $output =~ s/ Line \d+ ://g;
$output =~ s/prog\.c:[:\d]*//g; $output =~ s/prog\.c:[:\d]*//g;
@ -940,6 +943,7 @@ if($output =~ m/^\s*$/) {
$output =~ s/prog\.c://g; $output =~ s/prog\.c://g;
} }
$output =~ s/;?\s?__PRETTY_FUNCTION__ = "[^"]+"//g;
$output =~ s/(\d+:\d+:\s*)*cc1: warnings being treated as errors//; $output =~ s/(\d+:\d+:\s*)*cc1: warnings being treated as errors//;
$output =~ s/(\d+:\d+:\s*)* \(first use in this function\)//g; $output =~ s/(\d+:\d+:\s*)* \(first use in this function\)//g;
$output =~ s/(\d+:\d+:\s*)*error: \(Each undeclared identifier is reported only once.*?\)//msg; $output =~ s/(\d+:\d+:\s*)*error: \(Each undeclared identifier is reported only once.*?\)//msg;
@ -957,8 +961,8 @@ if($output =~ m/^\s*$/) {
$output =~ s/`/'/msg; $output =~ s/`/'/msg;
$output =~ s/\t/ /g; $output =~ s/\t/ /g;
$output =~ s/(\d+:\d+:\s*)*\s*In function .main.:\s*//g; $output =~ s/(\d+:\d+:\s*)*\s*In function .main.:\s*//g;
$output =~ s/(\d+:\d+:\s*)*warning: unknown conversion type character 'b' in format \[-Wformat\]\s+(\d+:\d+:\s*)*warning: too many arguments for format \[-Wformat-extra-args\]/info: %b is a candide extension/g; $output =~ s/(\d+:\d+:\s*)*warning: unknown conversion type character 'b' in format \[-Wformat=?\]\s+(\d+:\d+:\s*)*warning: too many arguments for format \[-Wformat-extra-args\]/info: %b is a candide extension/g;
$output =~ s/(\d+:\d+:\s*)*warning: unknown conversion type character 'b' in format \[-Wformat\]//g; $output =~ s/(\d+:\d+:\s*)*warning: unknown conversion type character 'b' in format \[-Wformat=?\]//g;
$output =~ s/\s\(core dumped\)/./; $output =~ s/\s\(core dumped\)/./;
# $output =~ s/\[\s+/[/g; # $output =~ s/\[\s+/[/g;
$output =~ s/ \[enabled by default\]//g; $output =~ s/ \[enabled by default\]//g;