[PATCH] D95423: [clangd] Add std::size_t to StdSymbol mapping

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 26 08:53:52 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG9190f17a7cc5: [clangd] Add std::size_t to StdSymbol mapping (authored by kadircet).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95423/new/

https://reviews.llvm.org/D95423

Files:
  clang-tools-extra/clangd/index/CanonicalIncludes.cpp


Index: clang-tools-extra/clangd/index/CanonicalIncludes.cpp
===================================================================
--- clang-tools-extra/clangd/index/CanonicalIncludes.cpp
+++ clang-tools-extra/clangd/index/CanonicalIncludes.cpp
@@ -92,6 +92,8 @@
 #include "StdSymbolMap.inc"
         // There are two std::move()s, this is by far the most common.
         SYMBOL(move, std::, <utility>)
+        // There are multiple headers for size_t, pick one.
+        SYMBOL(size_t, std::, <cstddef>)
 #undef SYMBOL
     });
     StdSymbolMapping = Symbols;
@@ -99,6 +101,8 @@
     static const auto *CSymbols = new llvm::StringMap<llvm::StringRef>({
 #define SYMBOL(Name, NameSpace, Header) {#Name, #Header},
 #include "CSymbolMap.inc"
+        // There are multiple headers for size_t, pick one.
+        SYMBOL(size_t, None, <stddef.h>)
 #undef SYMBOL
     });
     StdSymbolMapping = CSymbols;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95423.319314.patch
Type: text/x-patch
Size: 901 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210126/f4cd6dfe/attachment-0001.bin>


More information about the cfe-commits mailing list