[all-commits] [llvm/llvm-project] 21f3df: [clangd] Fix test failure when it's built with com...

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Tue May 16 22:03:48 PDT 2023


  Branch: refs/heads/release/16.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 21f3dfbc26736e4299c154e67065652f48279047
      https://github.com/llvm/llvm-project/commit/21f3dfbc26736e4299c154e67065652f48279047
  Author: Xi Ruoyao <xry111 at xry111.site>
  Date:   2023-05-16 (Tue, 16 May 2023)

  Changed paths:
    M clang-tools-extra/clangd/test/CMakeLists.txt
    A clang-tools-extra/clangd/test/compile_commands.json

  Log Message:
  -----------
  [clangd] Fix test failure when it's built with compiler flags unknown by clang

If LLVM is built with a compiler other than clang, the `compile_commands.json`
file may contain compiler flags unknown by clang.  When a clangd test is copied
into the build directory and checked, clangd will pick the unknown flag from
the file and cause a test failure.  Create an empty `compile_commands.json` in
the test directory nested in the build directory to override it.

Reviewed By: thesamesam

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

(cherry picked from commit 4ddae8b941398a6579d3a6f25aa39a260e441371)


  Commit: ae42196bc493ffe877a7e3dff8be32035dea4d07
      https://github.com/llvm/llvm-project/commit/ae42196bc493ffe877a7e3dff8be32035dea4d07
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2023-05-16 (Tue, 16 May 2023)

  Changed paths:
    M clang-tools-extra/clangd/test/CMakeLists.txt
    R clang-tools-extra/clangd/test/compile_commands.json

  Log Message:
  -----------
  [clangd] Fix builds after 4ddae8b941398a6579d3

(cherry picked from commit 9ffef0f24de0fc05b946e662a7b233a32ad058e3)


Compare: https://github.com/llvm/llvm-project/compare/82b4446f25d4...ae42196bc493


More information about the All-commits mailing list