if (defined $file) {
# Get filename, we can't use the complete path as only parts of it are
# used in the real compiler command.
- $file =~ m{/([a-zA-Z0-9._-]+)$};
+ $file =~ m{/([^/\s]+)$};
$file = $1;
if ($next_line =~ /\Q$file\E/ and $next_line =~ /$cc_regex/o) {