sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/InlayHints.cpp:79
+      if (!Deduced.isNull()) {
+        SourceRange R = D->getReturnTypeSourceRange();
+        // For operator auto(), have to get location of `auto` a different way.
----------------
nit: bool TrailingReturnType = D->getReturnTypeSourceRange().isValid()?


================
Comment at: clang-tools-extra/clangd/unittests/InlayHintTests.cpp:505
+  )cpp",
+      ExpectedHint{": int", "ret1a"}, ExpectedHint{": int", "ret1b"},
+      ExpectedHint{": int &", "ret2"}, ExpectedHint{": int", "retConv"});
----------------
This reads as "auto[: int] f1(int x);", which doesn't look much like familiar 
syntax, C++ or otherwise.

I guess we could try `auto f1(int x)[-> int];`?

(From playing with these in vscode, I'm not sure I find the punctuation very 
useful)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103789

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

Reply via email to