[all-commits] [llvm/llvm-project] 9ee32f: [NFC] Hoist DiagOpts.showColors(OS.has_colors()) o...

Akira Hatanaka via All-commits all-commits at lists.llvm.org
Mon Sep 14 11:22:08 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9ee32f72f4415b3e2b7acbf4237b8cc0daa3c8b7
      https://github.com/llvm/llvm-project/commit/9ee32f72f4415b3e2b7acbf4237b8cc0daa3c8b7
  Author: Akira Hatanaka <ahatanak at gmail.com>
  Date:   2026-09-14 (Mon, 14 Sep 2026)

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

  Log Message:
  -----------
  [NFC] Hoist DiagOpts.showColors(OS.has_colors()) out of emitSnippet's per-character loop (#223095)

The result of DiagOpts.showColors(OS.has_colors()) does not change while
printing a single source snippet, so recomputing it for every character
is unnecessary. Compute it once per snippet instead.

rdar://186469856

Co-authored-by: Fred Riss <friss at apple.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list