kadircet added inline comments.
================ Comment at: clang-tools-extra/clangd/IncludeFixer.cpp:75 + /* + There are many "incomplete type" diagnostics! + They are almost all Sema diagnostics with "incomplete" in the name. ---------------- have you considered updating these diagnostics to have "incomplete" as diagnostic category and do the filtering here based on that? ================ Comment at: clang-tools-extra/clangd/IncludeFixer.cpp:176 + if (auto * ET = llvm::dyn_cast<EnumType>(T)) + if (ET->getDecl()->getDefinition() == nullptr) + return fixIncompleteType(*T); ---------------- nit: `if (!ET->...)` ================ Comment at: clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp:842 - ns::X $incomplete[[var]]; - $tag[[ref_x]]->f(); - $use[[ns::X()]]; - $sizeof[[sizeof]](ns::X); - for (auto it : $for[[ref_x]]); + std::vector<std::pair<llvm::StringRef, llvm::StringRef>> Tests{ + {"incomplete_nested_name_spec", "[[ns::X::]]Nested n;"}, ---------------- thanks this one looks a lot better! I just wonder if we should send it as a separate patch though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115484/new/ https://reviews.llvm.org/D115484 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits