[all-commits] [llvm/llvm-project] ef5217: [clang][Diagnostics] Fix wrong line number display...

Takuya Shimizu via All-commits all-commits at lists.llvm.org
Mon Sep 4 20:12:56 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ef5217b3c0dcbb58927fe43400b6d1faa677bf98
      https://github.com/llvm/llvm-project/commit/ef5217b3c0dcbb58927fe43400b6d1faa677bf98
  Author: Takuya Shimizu <shimizu2486 at gmail.com>
  Date:   2023-09-05 (Tue, 05 Sep 2023)

  Changed paths:
    M clang/lib/Frontend/TextDiagnostic.cpp
    M clang/test/Misc/diag-style.cpp

  Log Message:
  -----------
  [clang][Diagnostics] Fix wrong line number display (#65238)

When the caret location is lower than the lowest source range, clang is
printing wrong line numbers. The first line number should consider caret
location line even when there are source ranges provided.

Current wrong line example: https://godbolt.org/z/aj4qEjzs4




More information about the All-commits mailing list