[PATCH] D60126: [clangd] Use identifiers in file as completion candidates when build is not ready.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 11 01:33:00 PDT 2019


ioeric added inline comments.


================
Comment at: clangd/CodeComplete.cpp:1360
         getQueryScopes(Recorder->CCContext, *Recorder->CCSema, Opts);
     if (!QueryScopes.empty())
       ScopeProximity.emplace(QueryScopes);
----------------
sammccall wrote:
> add this to the non-sema case too (though the if is always false for now), or add a fixme?
> Worried about forgetting this.
Added a FIXME.


================
Comment at: clangd/Headers.cpp:196
+  if (!HeaderSearchInfo)
+    return "\"" + InsertedHeader.File + "\"";
+  std::string Suggested = HeaderSearchInfo->suggestPathToFileForDiagnostics(
----------------
sammccall wrote:
> Do we expect this code path to ever be called?
> We may want to assert or elog here, depending on how this can be hit.
This can be hit when we start serving index symbols in fallback mode completion. `shouldInsertInclude` will return false, but the calculation will be attempted regardless. We can probably elog this, but the number of log messages would be O(# of index symbols), which I worry might be too spammy.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D60126





More information about the cfe-commits mailing list