[PATCH] D138678: [include-cleaner] Capture private headers in PragmaIncludes.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 25 02:35:52 PST 2022
kadircet added inline comments.
================
Comment at: clang-tools-extra/include-cleaner/include/clang-include-cleaner/Record.h:97
+ /// the IWYU private pragmas with public mapping.
+ llvm::DenseSet<llvm::sys::fs::UniqueID> IWYUPrivate;
+
----------------
i'd actually merge this with the previous map, and store empty verbatim spellings. semantics of `getPublic` is to return empty path when there are no mappings anyway.
================
Comment at: clang-tools-extra/include-cleaner/unittests/RecordTest.cpp:381
+ // IWYU pragma: private
+ class Private {};
+ )cpp";
----------------
nit: no need for the declaration of `Private` here (nor in `private.h`). it's actually introducing a double definition error into TU now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138678/new/
https://reviews.llvm.org/D138678
More information about the cfe-commits
mailing list