Commit 4deee543 authored by Friedemann Kleint's avatar Friedemann Kleint

gcc2tasks.pl: Also detect errors

Previously, the script would only detect warnings. Adapt
the pattern to capture errors as well.

Change-Id: I15ad97a9a1305aab91c046518f3c46b2e0c55127
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 7ee75bf4
...@@ -41,11 +41,12 @@ while (my $line = <STDIN> ) { ...@@ -41,11 +41,12 @@ while (my $line = <STDIN> ) {
chomp($line); chomp($line);
# --- extract file name based matching: # --- extract file name based matching:
# file.cpp:214:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] # file.cpp:214:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if ($line =~ /^([^:]+):(\d+):\d*:? warning: (.*)$/) { if ($line =~ /^([^:]+):(\d+):\d*:? (warning|error): (.*)$/) {
my $fileName = $1; my $fileName = $1;
my $lineNumber = $2; my $lineNumber = $2;
my $text = $3; my $type = $3 eq 'warning' ? 'warn' : 'err';
my $text = $4;
$fileName =~ s|\\|/|g; $fileName =~ s|\\|/|g;
print $fileName, "\t", $lineNumber, "\twarn\t", $text,"\n"; print $fileName, "\t", $lineNumber, "\t", $type, "\t", $text,"\n";
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment