[clangd] Use all inputs to SystemIncludeExtractor in cache key
authorKadir Cetinkaya <kadircet@google.com>
Mon, 27 Mar 2023 10:29:22 +0000 (12:29 +0200)
committerKadir Cetinkaya <kadircet@google.com>
Mon, 17 Apr 2023 14:57:33 +0000 (16:57 +0200)
commitf099f2fefbab0592c828573d816b46a475076f49
tree2fb7cd4d836bded1147307220147c6de0e28308b
parentd87cd45e4d855b57aed76dbd72c270ed152542ff
[clangd] Use all inputs to SystemIncludeExtractor in cache key

Instead of passing in a tooling::CompileCommand into system include
extraction, pass a limited set, whose elements are used as keys.

Also fix the issue around accepting `-isysroot=/foo` which isn't a valid
argument (or the directory should be `=/foo` not `/foo`).

Fixes https://github.com/clangd/clangd/issues/1404
Fixes https://github.com/clangd/clangd/issues/1403

This should also unblock https://reviews.llvm.org/D138546

Differential Revision: https://reviews.llvm.org/D146941
clang-tools-extra/clangd/SystemIncludeExtractor.cpp
clang-tools-extra/clangd/test/system-include-extractor.test