[PATCH] D114623: [clangd] IncludeCleaner: Attribute symbols from non self-contained headers to their parents

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 26 02:58:52 PST 2021


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

When a symbol comes from the non self-contained header, we recursively uplift
the file we consider used to the first includer that has a header guard. We
need to do this while we still have FileIDs because every time a non
self-contained header is included, it gets a new FileID but is later
deduplicated by HeaderID and it's not possible to understand where it was
included from.

Based on D114370 <https://reviews.llvm.org/D114370>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114623

Files:
  clang-tools-extra/clangd/IncludeCleaner.cpp
  clang-tools-extra/clangd/IncludeCleaner.h
  clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114623.389974.patch
Type: text/x-patch
Size: 5508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211126/c6039ed6/attachment.bin>


More information about the cfe-commits mailing list