[PATCH] D138678: [include-cleaner] Capture private headers in PragmaIncludes.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 28 00:34:21 PST 2022


hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.

Thanks, looks good from my side, a few nits on the test.



================
Comment at: clang-tools-extra/include-cleaner/unittests/RecordTest.cpp:364
+
   EXPECT_EQ(PI.getPublic(PrivateFE.get()), "\"public2.h\"");
   auto PublicFE = Processed.fileManager().getFile("public.h");
----------------
nit: IIUC, we're using a blank line to separate the tests per FileEntry,  this `EXPECT_EQ` statement should belong to the above group (which is `PrivateFE`), right?


================
Comment at: clang-tools-extra/include-cleaner/unittests/RecordTest.cpp:367
   assert(PublicFE);
   EXPECT_EQ(PI.getPublic(PublicFE.get()), ""); // no mapping.
+
----------------
nit: add `EXPECT_FALSE(PI.isPrivate(PublicFE.get()));`


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