[PATCH] D143906: [include-cleaner] Better support ambiguous std symbols

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 14 00:59:07 PST 2023


hokein marked an inline comment as done.
hokein added a comment.

Thanks for the review!



================
Comment at: clang-tools-extra/include-cleaner/lib/FindHeaders.cpp:85
 
+Hints isPublicHeader(const FileEntry *FE, const PragmaIncludes *PI) {
+  return (PI->isPrivate(FE) || !PI->isSelfContained(FE)) ? Hints::None
----------------
kadircet wrote:
> we actually need to nullcheck for PI here, defaulting to PublicHeader when it isn't present.
ah, I think we can make it a reference, all callsites can guarantee the PI is nonnull.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143906



More information about the cfe-commits mailing list