[PATCH] D124359: [clangd] Add inlay hints for mutable reference parameters

Tobias Ribizel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 29 13:38:35 PDT 2022


upsj added inline comments.


================
Comment at: clang-tools-extra/clangd/InlayHints.cpp:448-450
+    return Type->isReferenceType() &&
+                   !Type.getNonReferenceType().isConstQualified()
+               ? (Type->isLValueReferenceType() ? "&" : "&&")
----------------
It probably doesn't make too much sense to highlight r-value references here, since it should be much clearer from context that they are either temporaries or explicitly std::move'd


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124359



More information about the cfe-commits mailing list