hokein added inline comments.
================ Comment at: clang-tools-extra/include-cleaner/lib/Record.cpp:299 + } else if (Pragma->starts_with("end_keep")) { + InsidePragmaKeepBlock = false; + } ---------------- using a simple variable is not enough to handle the nested case like ``` // IWYU pragma: begin_keep #include "keep1.h" // IWYU pragma: begin_keep #include "keep2.h" #include "keep3.h" // IWYU pragma: end_keep #include "keep4.h" // IWYU pragma: end_keep ``` now `keep4.h` is marked as unkeeped. I think we need to maintain a stack for `Keep` here (we already have a similar pattern for `export`) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138782/new/ https://reviews.llvm.org/D138782 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits