[PATCH] D147875: [clang][Diagnostics] Show line numbers when printing code snippets
Jessica Clarke via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 26 09:57:54 PDT 2023
jrtc27 added a comment.
In D147875#4448545 <https://reviews.llvm.org/D147875#4448545>, @hans wrote:
> I noticed that at least for some cases of `-Wformat`, the line numbers on the left seem to be off: https://github.com/llvm/llvm-project/issues/63524
That's because DisplayLineNo refers to the line of the diagnostic, not the first source line, and then counts up. What's the reason for DisplayLineNo in the first place? Given the printed line comes from LineNo, surely we should be using LineNo instead?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147875/new/
https://reviews.llvm.org/D147875
More information about the cfe-commits
mailing list