[clang-tools-extra] r361960 - [clangd] Fix buildbot error.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Wed May 29 07:11:53 PDT 2019


Author: hokein
Date: Wed May 29 07:11:53 2019
New Revision: 361960

URL: http://llvm.org/viewvc/llvm-project?rev=361960&view=rev
Log:
[clangd] Fix buildbot error.

Modified:
    clang-tools-extra/trunk/clangd/index/CanonicalIncludes.cpp

Modified: clang-tools-extra/trunk/clangd/index/CanonicalIncludes.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/CanonicalIncludes.cpp?rev=361960&r1=361959&r2=361960&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/index/CanonicalIncludes.cpp (original)
+++ clang-tools-extra/trunk/clangd/index/CanonicalIncludes.cpp Wed May 29 07:11:53 2019
@@ -87,11 +87,15 @@ collectIWYUHeaderMaps(CanonicalIncludes
 }
 
 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)




More information about the cfe-commits mailing list