[all-commits] [llvm/llvm-project] 015781: [clang][Diagnostics][NFC] Don't create oversized C...

Timm Bäder via All-commits all-commits at lists.llvm.org
Wed May 31 01:21:57 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 01578153ee8228562d0f64d3847e7fc91573da36
      https://github.com/llvm/llvm-project/commit/01578153ee8228562d0f64d3847e7fc91573da36
  Author: Timm Bäder <tbaeder at redhat.com>
  Date:   2023-05-31 (Wed, 31 May 2023)

  Changed paths:
    M clang/lib/Frontend/TextDiagnostic.cpp

  Log Message:
  -----------
  [clang][Diagnostics][NFC] Don't create oversized CaretLine

Instead of creating a CaretLine the size of the SourceLine, just leave
it empty at first, let HighlightRange resize it to fit all the ~, then
resize it to fit the ^. Then we can save ourselves the work to remove
the trailing whitespace again.

Differential Revision: https://reviews.llvm.org/D151286




More information about the All-commits mailing list