dgoldman added inline comments.

================
Comment at: clang-tools-extra/clangd/CodeComplete.cpp:866
     case CodeCompletionResult::RK_Pattern:
-      return Result.Pattern->getTypedText();
+      CCS = Result.Pattern;
+      break;
----------------
sammccall wrote:
> weirdly, codeCompletionString(Result) looks like it would mutate Result and 
> then return a pattern with the same chunks (but different extra fields). So 
> not affect the result of this function, but possibly others as a side-effect.
> 
> (e.g. add BriefComment and ParentName in the case that there's a pattern + 
> declaration, as there is here)
> 
> What you have is fine, but if you feel like digging deeper 
> codeCompletionString(Result) may be either better or worse here!
Hmm from what I can tell, it appears those are unused by clangd, but for 
posterity I can swap it over


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128821

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

Reply via email to