[PATCH] D138676: [include-cleaner] HTMLReport shows headers that would be inserted

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 24 08:33:50 PST 2022


sammccall created this revision.
sammccall added a reviewer: hokein.
Herald added a subscriber: mgrang.
Herald added a project: All.
sammccall requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

Demo: https://htmlpreview.github.io/?https://gist.githubusercontent.com/sam-mccall/9730f933a2cf2e003365520b6636f731/raw/7911d8251ceab7c244e0510285105027cd0a9403/PathMapping.cpp.html

Header insertion doesn't actually work that well (not this patch's fault):

- we don't have ranking of locations/headers yet, so inserted header is pretty random
- on my system, we get a lot of absolute "/usr/bin/../include/..." paths. This is a HeaderSearch bug introduced in D60873 <https://reviews.llvm.org/D60873> that I'll send a fix for


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138676

Files:
  clang-tools-extra/include-cleaner/lib/AnalysisInternal.h
  clang-tools-extra/include-cleaner/lib/HTMLReport.cpp
  clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138676.477807.patch
Type: text/x-patch
Size: 10534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221124/8092d957/attachment-0001.bin>


More information about the cfe-commits mailing list