[all-commits] [llvm/llvm-project] a46bbc: [cland] Dont emit missing newline warnings when bu...

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Fri Apr 23 00:02:20 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a46bbc14f004c06bd1317e6d7a486c29133f1c0b
      https://github.com/llvm/llvm-project/commit/a46bbc14f004c06bd1317e6d7a486c29133f1c0b
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2021-04-23 (Fri, 23 Apr 2021)

  Changed paths:
    M clang-tools-extra/clangd/Preamble.cpp
    M clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp

  Log Message:
  -----------
  [cland] Dont emit missing newline warnings when building preamble

When building preamble, clangd truncates file contents. This yielded
errnous warnings in some cases.

This patch fixes the issue by turning off no-newline-at-eof warnings whenever
the file has more contents than the preamble.

Fixes https://github.com/clangd/clangd/issues/744.

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




More information about the All-commits mailing list