kadircet added inline comments.

================
Comment at: clang/lib/Sema/SemaCodeComplete.cpp:3172
+    // Add a space after return type.
+    if (Chunk.Kind == CodeCompletionString::CK_ResultType) {
+      assert(!SeenTypedChunk);
----------------
ilya-biryukov wrote:
> kadircet wrote:
> > do we expect anything but return type in the `BeforeName` or any case where 
> > we shouldn't put a space between `BeforeName` and `NameAndSignature` ?
> > 
> > why not let the user add a space while concatenating these two?
> Maybe annotations? But not sure where they go (also not sure we should print 
> them here).
> I could move adding the space to the point where we concatenate `BeforeName` 
> and `NameAndSignature` if that would make it clearer.
I usually find it annoying when some helper function returns strings with 
trailing whitespaces, which is not useful in the general case. (Faced those a 
lot during `HoverInfo` patch.) I believe it would make the function more usable 
to others, so let's make it part of concat logic.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62298



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

Reply via email to