[clang] [clang-tools-extra] [clangd] Fixed signature help for static call operator (C++23) (PR #199192)
via cfe-commits
cfe-commits at lists.llvm.org
Mon May 25 02:47:33 PDT 2026
================
@@ -7867,11 +7867,13 @@ void Sema::AddFunctionCandidates(const UnresolvedSetImpl &Fns,
// This branch handles both standalone functions and static methods.
// Slice the first argument (which is the base) when we access
- // static method as non-static.
+ // static operator() as non-static.
if (Args.size() > 0 &&
- (!Args[0] || (FirstArgumentIsBase && isa<CXXMethodDecl>(FD) &&
- !isa<CXXConstructorDecl>(FD)))) {
- assert(cast<CXXMethodDecl>(FD)->isStatic());
----------------
timon-ul wrote:
I think you also misunderstood me here, for the case of `FirstArgumentIsBase == true` we do nopt check for `static`, but we still expect it to be the case so the assert still makes sense to keep (in its original state).
https://github.com/llvm/llvm-project/pull/199192
More information about the cfe-commits
mailing list