[flang-commits] [openmp] [lld] [compiler-rt] [flang] [lldb] [libunwind] [libcxxabi] [llvm] [libcxx] [mlir] [clang-tools-extra] [clang] [libc] [clang] static operators should evaluate object argument (reland) (PR #80108)

Younan Zhang via flang-commits flang-commits at lists.llvm.org
Tue Jan 30 23:51:14 PST 2024


================
@@ -651,16 +651,12 @@ class InlayHintVisitor : public RecursiveASTVisitor<InlayHintVisitor> {
     // implied object argument ([over.call.func]), the list of provided
     // arguments is preceded by the implied object argument for the purposes of
     // this correspondence...
-    //
-    // However, we don't have the implied object argument
-    // for static operator() per clang::Sema::BuildCallToObjectOfClassType.
     llvm::ArrayRef<const Expr *> Args = {E->getArgs(), E->getNumArgs()};
     // We don't have the implied object argument through a function pointer
     // either.
     if (const CXXMethodDecl *Method =
             dyn_cast_or_null<CXXMethodDecl>(Callee.Decl))
-      if (Method->isInstance() &&
-          (IsFunctor || Method->hasCXXExplicitFunctionObjectParameter()))
+      if (IsFunctor || Method->hasCXXExplicitFunctionObjectParameter())
----------------
zyn0217 wrote:

See https://github.com/llvm/llvm-project/pull/68485/files#diff-19c518dbc68b30c66e1a2b6bd523c005fb2050dcf1a0e92305df7ab3e1b9e9f3L15744-L15751. The patch actually changes the behavior when we put an implied object argument. (I was replying at wrong place in that PR...)

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


More information about the flang-commits mailing list