[clang] [clang-tools-extra] [clangd] Fix signature help for static call operator 196153 (C++23) (PR #197139)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Thu May 14 08:52:45 PDT 2026


================
@@ -6472,14 +6472,37 @@ SemaCodeCompletion::ProduceCallSignatureHelp(Expr *Fn, ArrayRef<Expr *> Args,
         LookupResult R(SemaRef, OpName, Loc, Sema::LookupOrdinaryName);
         SemaRef.LookupQualifiedName(R, DC);
         R.suppressDiagnostics();
-        SmallVector<Expr *, 12> ArgExprs(1, NakedFn);
-        ArgExprs.append(ArgsWithoutDependentTypes.begin(),
-                        ArgsWithoutDependentTypes.end());
-        SemaRef.AddFunctionCandidates(R.asUnresolvedSet(), ArgExprs,
-                                      CandidateSet,
-                                      /*ExplicitArgs=*/nullptr,
-                                      /*SuppressUserConversions=*/false,
-                                      /*PartialOverloading=*/true);
+        for (NamedDecl *D : R) {
+          NamedDecl *UD = D->getUnderlyingDecl();
+          if (auto *FD = dyn_cast<FunctionDecl>(UD)) {
+            if (FD->isStatic()) {
----------------
cor3ntin wrote:

```suggestion
          if (auto *FD = dyn_cast<FunctionDecl>(UD); FD && FD-> isStatic()) {
```

https://github.com/llvm/llvm-project/pull/197139


More information about the cfe-commits mailing list