sammccall added inline comments.

================
Comment at: clangd/CodeComplete.cpp:350
+      std::string QueryScope =
+          (normalizeScope(VS) +
+           (UnresolvedQualifier
----------------
sammccall wrote:
> It seems like you have stored the scopes in an unknown format, and call 
> "normalizeScope" defensively? Seems cleaner if you ensure both the scopes and 
> unknown are in the form:
>   - global = ""
>   - top-level = "::foo"
>   - nested = "::foo::bar"
> 
> Then this code can produce similarly-formatted output with just:
> 
>   Results.push_back(VS);
>   if (UnresolvedQualifier)
>     Results.back() += *UnresolvedQualifier;
> 
> We need to trim leading `::` before sending to the index, but I think that's 
> because we got the index API wrong. I'll send a patch to fix it.
(that patch landed as rL323000)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D42073



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to