[all-commits] [llvm/llvm-project] c4830a: [clangd] Use unique_function for config handlers (...

David Zbarsky via All-commits all-commits at lists.llvm.org
Tue Jul 14 22:59:19 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c4830afdbbc7b16a52a05d6a5b56e6c3fc14fb98
      https://github.com/llvm/llvm-project/commit/c4830afdbbc7b16a52a05d6a5b56e6c3fc14fb98
  Author: David Zbarsky <dzbarsky at gmail.com>
  Date:   2026-07-15 (Wed, 15 Jul 2026)

  Changed paths:
    M clang-tools-extra/clangd/ConfigYAML.cpp

  Log Message:
  -----------
  [clangd] Use unique_function for config handlers (#203008)

`ConfigYAML.cpp`'s `DictParser` owns its callbacks for one parse and
never copies them, so this replaces `std::function` with move-only
`llvm::unique_function` and removes the unused copy machinery for each
lambda.

In a matched Release AArch64 build, `ConfigYAML.cpp.o` shrank by 94,560
bytes, stripped clangd shrank by 16,848 bytes, unstripped clangd shrank
by 82,512 bytes, and dyld fixups fell by 336.

Validated with the 16 `ParseYAML` unit tests and `clangd --check`; 12
paired runs of 100,000 parses improved mean user CPU time by 3.46% (95%
CI: 1.31% to 5.61%).

Work towards #202616

AI tool disclosure: Co-authored with OpenAI Codex.



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