[PATCH] D92290: [clangd] Factor out the heuristic resolver code into its own class

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 16 00:47:25 PST 2021


sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

Thanks so much for pushing this through, it looks great.

In D92290#2564656 <https://reviews.llvm.org/D92290#2564656>, @nridge wrote:

> I haven't refactored the tests to pass in a null resolver / annotate the ones that do or don't need one. Would you like that done in this patch, or a follow-up?

Let's go ahead and land this, I'm happy to make the test changes.
(Not worried about regressions, as clearly we're never passing null in production)



================
Comment at: clang-tools-extra/clangd/HeuristicResolver.h:65
+  // Try to heuristically resolve the type of a dependent nested name
+  // specifier.
+  const Type *
----------------
nit: maybe just me, but "type of a NNS" is confusing because my brain thinks it's something like "type of an expr".

Maybe "type denoted by a NNS"?

Maybe also "Note that *dependent* name specifiers always name types, not e.g. namespaces".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92290



More information about the cfe-commits mailing list