[PATCH] D138780: [include-cleaner] Merge 2 parseIWYUPragma impls in libToolingInclusions

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 28 02:19:36 PST 2022


sammccall added inline comments.


================
Comment at: clang-tools-extra/include-cleaner/lib/Record.cpp:146
 // to share the code?
 static llvm::Optional<StringRef> parseIWYUPragma(const char *Text) {
+  // Skip the comment start, // or /*.
----------------
hokein wrote:
> I'd like to have some unittests for this function (the cases you mentioned are really good, I don't want to lose them), but this function is not exposed. Maybe expose it or even address the FIXME?
Done.

This stings a little as I'd recently done this in 5d2d527c32, after which D136071 copied the impl without any tests and added new bugs.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138780



More information about the cfe-commits mailing list