[all-commits] [llvm/llvm-project] 35d867: [clangd] Filter pch related flags coming from the ...

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Sun May 10 04:04:21 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 35d867a790c2bcf2008b2ee1895ae8af2793b797
      https://github.com/llvm/llvm-project/commit/35d867a790c2bcf2008b2ee1895ae8af2793b797
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2020-05-10 (Sun, 10 May 2020)

  Changed paths:
    M clang-tools-extra/clangd/Compiler.cpp
    M clang-tools-extra/clangd/unittests/CMakeLists.txt
    A clang-tools-extra/clangd/unittests/CompilerTests.cpp

  Log Message:
  -----------
  [clangd] Filter pch related flags coming from the user

Summary:
PCH format is unstable, hence using a preamble built with a different
version of clang (or even worse, a different compiler) might result in
unexpected behaviour.

PCH creation on the other hand is something clangd wouldn't want to perform, as
it doesn't generate any output files.

This patch makes sure clangd drops any PCH related compile commands after
parsing the command line args.

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

Reviewers: sammccall

Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

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




More information about the All-commits mailing list