[PATCH] D79669: [clangd] Filter pch related flags coming from the user

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 9 03:41:06 PDT 2020


kadircet created this revision.
kadircet added a reviewer: sammccall.
Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov, mgorny.
Herald added a project: clang.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79669

Files:
  clang-tools-extra/clangd/Compiler.cpp
  clang-tools-extra/clangd/unittests/CMakeLists.txt
  clang-tools-extra/clangd/unittests/CompilerTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79669.263011.patch
Type: text/x-patch
Size: 3706 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200509/7380f5d2/attachment.bin>


More information about the cfe-commits mailing list