This commit fixes "TextDiagnostic::emitIncludeLocation" when compiling
with "-fdiagnostics-absolute-paths" flag enabled by emitting the absolute
path of the included file.
Fixes #63026
Differential D151833
Respect "-fdiagnostics-absolute-paths" on emit include location charmitro on May 31 2023, 12:58 PM. Authored by
Details This commit fixes "TextDiagnostic::emitIncludeLocation" when compiling Fixes #63026
Diff Detail
Event TimelineComment Actions Can you add a test case for the change? Looks like there's something similar already in clang/test/Frontend/absolute-paths.c Comment Actions Is it possible to use substitutions inside let's say NORMAL: ? How could I resolve the absolute path without hard-coding my path inside the test case? Comment Actions I was able to make it work using -DNAME=<value> in the FileCheck invocation inside absolute-paths.c test file.
Comment Actions Do you need someone to commit on your behalf? If so, what name and email address would you like used for patch attribution? Comment Actions I do not have commit rights, since I'm planning to contribute more often, I'd like commit access at some point. I can request it ASAP if needed. Comment Actions Can the commit message have a description please? It's unclear to me why this is necessary (although I'm sure there's a good reason). Comment Actions Nice, thanks! Would you mind adding Fixes #63026. somewhere in the commit message? That will auto-close the issue upon merge. |
This checks the same thing in both cases, but in the NORMAL case, it should not use the absolute path, shouldn't it?