[all-commits] [llvm/llvm-project] afbe3a: [clangd] Minor refactor of CanonicalIncludes::addS...

Ilya Biryukov via All-commits all-commits at lists.llvm.org
Thu Jun 9 03:19:56 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: afbe3aed4986300ee2cdbb5c0303bee172c2731b
      https://github.com/llvm/llvm-project/commit/afbe3aed4986300ee2cdbb5c0303bee172c2731b
  Author: Paul Pluzhnikov <ppluzhnikov at google.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M clang-tools-extra/clangd/index/CanonicalIncludes.cpp

  Log Message:
  -----------
  [clangd] Minor refactor of CanonicalIncludes::addSystemHeadersMapping.

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.

Change by Paul Pluzhnikov (ppluzhnikov)!

Reviewed By: ilya-biryukov

Differential Revision: https://reviews.llvm.org/D125742




More information about the All-commits mailing list