This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Include-fixer: handle more "incomplete type" diags, clean up tests
ClosedPublic

Authored by sammccall on Dec 9 2021, 5:14 PM.

Details

Summary

I started adding tests for all diags but found there were just too many cases.
Still I think cleaning up the tests and adding a few more is worthwhile.

Diff Detail

Event Timeline

sammccall created this revision.Dec 9 2021, 5:14 PM
sammccall requested review of this revision.Dec 9 2021, 5:14 PM
kadircet added inline comments.Dec 10 2021, 8:22 AM
clang-tools-extra/clangd/IncludeFixer.cpp
75

have you considered updating these diagnostics to have "incomplete" as diagnostic category and do the filtering here based on that?

176

nit: if (!ET->...)

clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp
834–835

thanks this one looks a lot better!

I just wonder if we should send it as a separate patch though.

kadircet accepted this revision.Dec 10 2021, 8:22 AM
This revision is now accepted and ready to land.Dec 10 2021, 8:22 AM
This revision was landed with ongoing or failed builds.Dec 10 2021, 4:46 PM
This revision was automatically updated to reflect the committed changes.
sammccall marked 2 inline comments as done.