[PATCH] D52274: [clangd] Collect and store expected types in the index

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 26 06:37:58 PST 2018


sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clangd/index/Index.h:283
 
+  /// Type of the symbol, used for scoring purposes.
+  llvm::StringRef Type;
----------------
either call this OpaqueType or point at in in the comment?

I'd put this below the `ReturnType` string too, it seems out of place here. But up to you.


================
Comment at: clangd/index/SymbolCollector.cpp:591
+  llvm::Optional<OpaqueType> Type;
+  if (S.Flags & Symbol::IndexedForCodeCompletion)
+    Type = OpaqueType::fromCompletionResult(*ASTCtx, SymbolCompletion);
----------------
nit: like this?
```
if (indexed for code completion)
 if (auto T = ...)
   S.Type = T->raw();
```


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D52274





More information about the cfe-commits mailing list