[all-commits] [llvm/llvm-project] 49843c: [clang][Diagnostics] Simplify emitSnippet()

Timm Bäder via All-commits all-commits at lists.llvm.org
Wed May 31 00:41:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 49843c5036847a8e2f83852c8a515c2784a1645e
      https://github.com/llvm/llvm-project/commit/49843c5036847a8e2f83852c8a515c2784a1645e
  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] Simplify emitSnippet()

Don't try to minimize the times we invoke operator<< on the output
stream by keeping a ToPrint string around. Instead, just print the
characters as we iterate over them.

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




More information about the All-commits mailing list