diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-02-20 15:19:57 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-02-20 16:21:43 +0000 |
commit | 4deee5431aa460d0fbcb7141bb8a3cc05c26cb66 (patch) | |
tree | 8c5cdd8bb5fde41d18def1eea582f4a20bd39c91 /scripts | |
parent | 7ee75bf4c21bac6992f0d63bf2ce850828a39eb0 (diff) |
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 <tobias.hunger@qt.io>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/gcc2tasks.pl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/gcc2tasks.pl b/scripts/gcc2tasks.pl index 448a231c6a..1a6dbc546d 100755 --- a/scripts/gcc2tasks.pl +++ b/scripts/gcc2tasks.pl @@ -41,11 +41,12 @@ while (my $line = <STDIN> ) { chomp($line); # --- extract file name based matching: # 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 $lineNumber = $2; - my $text = $3; + my $type = $3 eq 'warning' ? 'warn' : 'err'; + my $text = $4; $fileName =~ s|\\|/|g; - print $fileName, "\t", $lineNumber, "\twarn\t", $text,"\n"; + print $fileName, "\t", $lineNumber, "\t", $type, "\t", $text,"\n"; } } |