================
@@ -7869,9 +7869,10 @@ void Sema::AddFunctionCandidates(const UnresolvedSetImpl 
&Fns,
       // Slice the first argument (which is the base) when we access
       // static method as non-static.
       if (Args.size() > 0 &&
-          (!Args[0] || (FirstArgumentIsBase && isa<CXXMethodDecl>(FD) &&
-                        !isa<CXXConstructorDecl>(FD)))) {
-        assert(cast<CXXMethodDecl>(FD)->isStatic());
+          (!Args[0] ||
+           (isa<CXXMethodDecl>(FD) && !isa<CXXConstructorDecl>(FD) &&
+            (FirstArgumentIsBase || cast<CXXMethodDecl>(FD)->isStatic())))) {
----------------
timon-ul wrote:

I think if we can we do not want to let all static methods through here, but 
only for FirstArgumentIsBase or it is the function operator. For this I think 
the best option is to just do FD->getOverloadedOperator() == OO_Call.

https://github.com/llvm/llvm-project/pull/199192
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to