From 4d0e23243bcc08bdfc4961c4f1be0a091e897cc0 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sat, 1 Mar 2014 14:42:08 +0000 Subject: [PATCH] compiler_vm: minor beautification of compiler diagnostic output --- PBot/VERSION.pm | 4 ++-- modules/compiler_vm/compiler_vm_client.pl | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 5ad19d77..2a3ce826 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,8 +13,8 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 492, - BUILD_DATE => "2014-02-27", + BUILD_REVISION => 493, + BUILD_DATE => "2014-03-01", }; 1; diff --git a/modules/compiler_vm/compiler_vm_client.pl b/modules/compiler_vm/compiler_vm_client.pl index 60611af2..61d7238f 100755 --- a/modules/compiler_vm/compiler_vm_client.pl +++ b/modules/compiler_vm/compiler_vm_client.pl @@ -932,6 +932,9 @@ if($output =~ m/^\s*$/) { 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")) { $output =~ s/ Line \d+ ://g; $output =~ s/prog\.c:[:\d]*//g; @@ -940,6 +943,7 @@ if($output =~ m/^\s*$/) { $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*)* \(first use in this function\)//g; $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/\t/ /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\]//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/\s\(core dumped\)/./; # $output =~ s/\[\s+/[/g; $output =~ s/ \[enabled by default\]//g;