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

Xi Ruoyao via All-commits all-commits at lists.llvm.org
Mon May 15 19:56:45 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4ddae8b941398a6579d3a6f25aa39a260e441371
      https://github.com/llvm/llvm-project/commit/4ddae8b941398a6579d3a6f25aa39a260e441371
  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




More information about the All-commits mailing list