[clangd] Fix buildbot error.

llvm-svn: 361960
This commit is contained in:
Haojian Wu 2019-05-29 14:11:53 +00:00
parent e3b1f5d22c
commit 228b130a4b
1 changed files with 4 additions and 0 deletions

View File

@ -87,11 +87,15 @@ collectIWYUHeaderMaps(CanonicalIncludes *Includes) {
}
void addSystemHeadersMapping(CanonicalIncludes *Includes) {
static const std::vector<std::pair<const char *, const char *>> SymbolMap = {
#define SYMBOL(Name, NameSpace, Header) { #NameSpace#Name, #Header },
#include "StdSymbolMap.inc"
#undef SYMBOL
};
for (const auto &Pair : SymbolMap)
Includes->addSymbolMapping(Pair.first, Pair.second);
// FIXME: remove the std header mapping once we support ambiguous symbols, now
// it serves as a fallback to disambiguate:
// - symbols with mulitiple headers (e.g. std::move)