[PATCH] D158926: [clangd] Show parameter hints for operator()

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 5 01:19:25 PDT 2023


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


================
Comment at: clang-tools-extra/clangd/InlayHints.cpp:626
+          Method && Method->isInstance())
+        Args = Args.drop_front(1);
+    processCall(Callee, Args);
----------------
Huh, that's an interesting inconsistency between CXXMemberCallExpr and CXXOperatorCallExpr (that one include th implied object argument in getArgs() and the other doesn't)

As always, thank you for writing thorough tests that give us confidence we're doing the right thing :)


================
Comment at: clang-tools-extra/clangd/InlayHints.cpp:1222
 
+  bool isFunctionObjectCallExpr(CallExpr *E) const noexcept {
+    if (auto *CallExpr = dyn_cast<CXXOperatorCallExpr>(E))
----------------
nit: this method can be static


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158926



More information about the cfe-commits mailing list