sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

Ah, this is subtle. Thanks!



================
Comment at: clang-tools-extra/clangd/CodeComplete.cpp:866
     case CodeCompletionResult::RK_Pattern:
-      return Result.Pattern->getTypedText();
+      CCS = Result.Pattern;
+      break;
----------------
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!


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