[PATCH] D125742: Minor refactor of CanonicalIncludes::addSystemHeadersMapping.

Paul Pluzhnikov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 16 21:17:26 PDT 2022


ppluzhnikov created this revision.
ppluzhnikov added a reviewer: ilya-biryukov.
Herald added subscribers: usaxena95, kadircet, arphaman.
Herald added a project: All.
ppluzhnikov requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

Before commit b3a991df3cd6a SystemHeaderMap used to be a vector.

Commit b3a991df3cd6a changed it into a map, but neglected to remove
duplicate keys (e.g. "bits/typesizes.h", "include/stdint.h", etc.).

To prevent confusion, remove all duplicates, build HeaderMapping
one pair at a time and assert() that no duplicates are found.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125742

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125742.429931.patch
Type: text/x-patch
Size: 57397 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220517/1831c072/attachment-0001.bin>


More information about the cfe-commits mailing list