Keep the includes contained between IWYU begin_keep and end_keep pragmas.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/include-cleaner/lib/Record.cpp | ||
---|---|---|
299 | 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) |
clang-tools-extra/include-cleaner/lib/Record.cpp | ||
---|---|---|
299 | Ok, I had no idea this was valid usage :( |
using a simple variable is not enough to handle the nested case like
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)