OSDN Git Service

[clangd] Set correct CWD when using compile_flags.txt
authorAdam Czachorowski <adamcz@google.com>
Thu, 14 Jan 2021 17:21:23 +0000 (18:21 +0100)
committerAdam Czachorowski <adamcz@google.com>
Fri, 15 Jan 2021 13:26:24 +0000 (14:26 +0100)
commitc77c3d1d18cdd58989f9d35bbf6c31f5fda0a125
treea195d3ae407eda09c5327dae4f6c7112727c2ab3
parentaeaeb9e6bdc90d9c4b839ac0e4edc6255021cced
[clangd] Set correct CWD when using compile_flags.txt

This fixes a bug where clangd would attempt to set CWD to the
compile_flags.txt file itself.

Differential Revision: https://reviews.llvm.org/D94699
clang-tools-extra/clangd/GlobalCompilationDatabase.cpp
clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp