[PATCH] D153248: [clangd] Use resolveTypeToRecordDecl() to resolve the type of a base specifier during heuristic resolution

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 19 00:16:28 PDT 2023


nridge added a comment.

As this patch involves copying a bit of code from CXXRecordDecl::lookupDepenentName() to HeuristicResolver, I wanted to mention a couple of alternatives I considered:

1. Copy things in the other direction, i.e. implement some of the necessary parts of resolveTypeToRecordDecl() in the helpers of lookupDependentName() instead. I decided against this because HeuristicResolver is an area of the code that's actively being improved; instead of having to make multiple updates to lookupDependentName() over time, it seems cleaner to just break HeuristicResolver's dependency on that function.
2. Wait to make this change until after HeuristicResolver has been upstreamed <https://github.com/clangd/clangd/discussions/1662> and unified with lookupDependentName(). I do plan to work on this upstreaming, but as the process will involve several steps (e.g. writing new tests, getting approval from relevant upstream maintainers), I would prefer not to block this change on the resolution of that process.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153248



More information about the cfe-commits mailing list