[PATCH] D54872: [clangd] Add ability to not use -resource-dir at all

2018-12-06 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In D54872#1319958 , @ilya-biryukov wrote: > I'm a bit confused now, will put up a few clarifying questions to make sure I > understand the probem properly. > Does `clang-cl` work correctly the arguments from `compile_commands.

[PATCH] D54872: [clangd] Add ability to not use -resource-dir at all

2018-12-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54872#1319684 , @malaperle wrote: > It doesn't seem like there is any difference in how -resource-dir and /imsvc > are handled: they are all added as -internal-isystem Thanks for digging this code up. I'm a bit confuse

[PATCH] D54872: [clangd] Add ability to not use -resource-dir at all

2018-12-04 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. It doesn't seem like there is any difference in how -resource-dir and /imsvc are handled: they are all added as -internal-isystem In MSVCToolChain::AddClangSystemIncludeArgs (MSCV.cpp): if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) { AddSystemIncludeWithSub

[PATCH] D54872: [clangd] Add ability to not use -resource-dir at all

2018-11-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Reading D54630 , I think that's what might be happening. Here's how to reproduce the problem though: - Clangd compiled from source with Visual Studio 2017 (i.e. not from win installer) - LLVM win installer from http://llvm.org/builds/

[PATCH] D54872: [clangd] Add ability to not use -resource-dir at all

2018-11-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54872#1309075 , @malaperle wrote: > In D54872#1307775 , @ilya-biryukov > wrote: > > > We have to point clangd into the resource dir, corresponding to the version > > of the heade

[PATCH] D54872: [clangd] Add ability to not use -resource-dir at all

2018-11-26 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle planned changes to this revision. malaperle added a comment. In D54872#1307775 , @ilya-biryukov wrote: > We have to point clangd into the resource dir, corresponding to the version > of the headers it was built with. It's important we pick the

[PATCH] D54872: [clangd] Add ability to not use -resource-dir at all

2018-11-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. We have to point clangd into the resource dir, corresponding to the version of the headers it was built with. It's important we pick the exact version of the built-in headers that clangd was built for. Note that resource-dir should **only** be used for the built-in

[PATCH] D54872: [clangd] Add ability to not use -resource-dir at all

2018-11-24 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Using Clang-cl, I have seen scenarios where the compilation database contains all flags necessary to find compiler-specific (CL) headers, using /imsvc. Specifying -