kadircet added inline comments.

================
Comment at: clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp:122
   llvm::DenseSet<include_cleaner::Symbol> SeenSymbols;
+  std::string ResourceDir = HS->getHeaderSearchOpts().ResourceDir;
   // FIXME: Find a way to have less code duplication between include-cleaner
----------------
VitaNuo wrote:
> kadircet wrote:
> > let's use `HS->getModuleMap().getBuiltinDir()` then we can get away with 
> > just comparing that pointer to `H.physical()->getLastRef().getDir()` (same 
> > applies to all the other places as well)
> This only works in `clangd` code for me. I get `nullptr` for 
> `HS->getModuleMap().getBuiltinDir()` in other places (Clang Tidy check and 
> the library).
hmm that's probably because you're not setting up the include structure 
correctly. resource-dir isn't the `builtindir`, it's `resource-dir + 
"/include"` (the comments i had in the clangd unittests applies in a similar 
manner to other tests as well).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157610

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

Reply via email to