hokein added inline comments.

================
Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:550
   std::optional<Fix> FixAll;
   if (RemoveAllUnused && AddAllMissing)
     FixAll = fixAll(*RemoveAllUnused, *AddAllMissing);
----------------
kadircet wrote:
> sorry for missing it during last review, but this should actually be `if 
> (!UnusedIncludes.empty() && !MissingIncludeDiags.empty())` as even if we have 
> only 1 fix for each category, we should still show the fix all. probably it 
> deserves a fix in a separate patch.
good catch, send a fix in https://reviews.llvm.org/D149822. (it turns out more 
tricky than we thought, only changing the if is not enough, I added some 
unittests for it).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149437/new/

https://reviews.llvm.org/D149437

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to