[PATCH] D88469: [clangd] Heuristic resolution for dependent type and template names

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 29 23:59:05 PDT 2020


hokein added inline comments.


================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:128
 const auto ValueFilter = [](const NamedDecl *D) { return isa<ValueDecl>(D); };
+const auto TypeFilter = [](const NamedDecl *D) { return !isa<ValueDecl>(D); };
 
----------------
nridge wrote:
> hokein wrote:
> > why not using `isa<TypeDecl>(D)`?
> Heh. When I wrote this, I searched for `TypeDecl` via `workspaceSymbols`, did not see it in the first few results, and concluded that there is no such type.
> 
> Now I see it is there, just further down (and below **partial** matches like `CFConstantStringTypeDecl`). Maybe I should file a `workspaceSymbols` bug about this :)
yeah, I reproduced that, I think it is probably a ranking bug -- but if you type `clang::TypeDecl`, you will get it from the first result. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88469



More information about the cfe-commits mailing list