kbobyrev added inline comments.

================
Comment at: clang-tools-extra/clangd/Headers.cpp:205
           CurrentLevel.push_back(Child);
-          const auto &Name = RealPathNames[Child];
           // Can't include files if we don't have their real path.
+          if (!RealPathNames[static_cast<unsigned>(Child)].empty())
----------------
sammccall wrote:
> kbobyrev wrote:
> > sammccall wrote:
> > > This is no longer true, we don't need the check.
> > Wait, why not? We still have unresolved includes, e.g. preamble patches are 
> > like that, their `RealPathName`s stay empty.
> Right, but why do we need to filter them out here?
> Can't we just drop them when we use them to seed the proximity sources?
I feel like producing them in the first place is kind of redundant, what signal 
does it give to the user through such API?

Getting some "hidden"/"unresolved" includes certainly feels rather confusing to 
me, post-filtering outside probably requires understanding of the internals 
which does not look like a good idea. WDYT?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110386

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

Reply via email to