[PATCH] D67172: [clangd] Use pre-populated mappings for standard symbols

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 6 04:56:22 PDT 2019


hokein added inline comments.


================
Comment at: clang-tools-extra/clangd/index/CanonicalIncludes.cpp:780
+  // Prefer a mapping from the system symbols.
+  if (SystemSymbols) {
+    if (auto Result = SystemSymbols->mapHeader(Header, QualifiedName))
----------------
what's the interesting case where `SystemSymbols` is null?
I think it should be fine to always use the standard symbol mapping here? just use `getStandardSymbolMapping()->mapHeader()`, this would help to simplify the CanonicalInclude interface (no `addSystemHeadersMapping` and `SystemSymbols` members  are needed).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67172





More information about the cfe-commits mailing list