This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Suppress IncludeCleaner warnings for headers behind pragma keep
ClosedPublic

Authored by kbobyrev on Dec 8 2021, 7:06 AM.

Details

Summary

D114072 allows filtering out the warnings for headers behind `// IWYU pragma:
keep`. This is the first step towards more useful IWYU pragmas support and
fine-grained control over the IncludeCleaner warnings.

Diff Detail

Event Timeline

kbobyrev created this revision.Dec 8 2021, 7:06 AM
kbobyrev requested review of this revision.Dec 8 2021, 7:06 AM
kadircet accepted this revision.Dec 8 2021, 8:33 AM

thanks, lgtm!

clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp
416

nit: just EXPECT_THAT(AST.getDiagnostics(), llvm::ValueIs(IsEmpty())) ?

418

nit: we mostly make use of a using decl for testing:: symbols in clangd unittests rather than qualifying at call sites. can you introduce a using decl for this one instead (and clean up the other occurrence)?

This revision is now accepted and ready to land.Dec 8 2021, 8:33 AM
kbobyrev updated this revision to Diff 392810.Dec 8 2021, 9:07 AM
kbobyrev marked 2 inline comments as done.

Address review comments.

This revision was landed with ongoing or failed builds.Dec 8 2021, 9:07 AM
This revision was automatically updated to reflect the committed changes.