[flang-commits] [flang] [flang] Remove directory path from compiler remarks (PR #212669)
Abid Qadeer via flang-commits
flang-commits at lists.llvm.org
Wed Jul 29 09:55:48 PDT 2026
abidh wrote:
Thanks for tackling this. I don't think trimming remarks to the bare filename is the right direction, for two reasons:
1. It doesn't actually match how flang shows errors/warnings. When the file is given with a directory, flang keeps that directory in the diagnostic. For example flang -c sub/err.f90:
sub/err.f90:4:7: error: No explicit type declared for 'undeclared_name_xyz'
So an error on sub/err.f90 shows sub/err.f90, but with this change a remark on the same file would show only err.f90.
2. It also diverges from clang. clang's remarks show the path as it was given, not the basename. For example clang -O3 -Rpass=loop-vectorize -c sub/rem.c:
sub/rem.c:22:3: remark: vectorized loop ... [-Rpass=loop-vectorize]
So dropping the directory would make flang remarks inconsistent with both flang's own errors/warnings and clang's remarks.
https://github.com/llvm/llvm-project/pull/212669
More information about the flang-commits
mailing list