[all-commits] [llvm/llvm-project] 3093d7: [clangd] Avoid libFormat's objective-c guessing he...

Nathan Ridge via All-commits all-commits at lists.llvm.org
Mon Mar 11 01:17:08 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3093d731dff93df02899dcc62f5e7ba02461ff2a
      https://github.com/llvm/llvm-project/commit/3093d731dff93df02899dcc62f5e7ba02461ff2a
  Author: Nathan Ridge <zeratul976 at hotmail.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M clang-tools-extra/clangd/ClangdServer.cpp
    M clang-tools-extra/clangd/CodeComplete.cpp
    M clang-tools-extra/clangd/IncludeCleaner.cpp
    M clang-tools-extra/clangd/ParsedAST.cpp
    M clang-tools-extra/clangd/SourceCode.cpp
    M clang-tools-extra/clangd/SourceCode.h
    M clang-tools-extra/clangd/tool/Check.cpp
    M clang-tools-extra/clangd/unittests/SourceCodeTests.cpp

  Log Message:
  -----------
  [clangd] Avoid libFormat's objective-c guessing heuristic where possible (#84133)

This avoids a known libFormat bug where the heuristic can OOM on certain
large files (particularly single-header libraries such as miniaudio.h).

The OOM will still happen on affected files if you actually try to
format them (this is harder to avoid since the underlyting issue affects
the actual formatting logic, not just the language-guessing heuristic),
but at least it's avoided during non-modifying operations like hover,
and modifying operations that do local formatting like code completion.

Fixes https://github.com/clangd/clangd/issues/719
Fixes https://github.com/clangd/clangd/issues/1384
Fixes https://github.com/llvm/llvm-project/issues/70945



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