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

2024-01-30 Thread Younan Zhang via cfe-commits
@@ -15097,15 +15102,9 @@ ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, ExprValueKind VK = Expr::getValueKindForType(ResultTy); ResultTy = ResultTy.getNonLValueExprType(Context); -CallExpr *TheCall; -if

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

2024-01-30 Thread Tianlan Zhou via cfe-commits
@@ -15097,15 +15102,9 @@ ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, ExprValueKind VK = Expr::getValueKindForType(ResultTy); ResultTy = ResultTy.getNonLValueExprType(Context); -CallExpr *TheCall; -if

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

2024-01-30 Thread Tianlan Zhou via cfe-commits
SuperSodaSea wrote: Ping @MitalAshok, are you happy with this PR? https://github.com/llvm/llvm-project/pull/68485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-30 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea updated https://github.com/llvm/llvm-project/pull/68485 >From 03276260c48d9cafb2a0d80825156e77cdf02eba Mon Sep 17 00:00:00 2001 From: SuperSodaSea Date: Sat, 7 Oct 2023 21:05:17 +0800 Subject: [PATCH 01/15] [clang] static operators should evaluate object

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

2024-01-25 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea updated https://github.com/llvm/llvm-project/pull/68485 >From 03276260c48d9cafb2a0d80825156e77cdf02eba Mon Sep 17 00:00:00 2001 From: SuperSodaSea Date: Sat, 7 Oct 2023 21:05:17 +0800 Subject: [PATCH 01/15] [clang] static operators should evaluate object

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

2024-01-11 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea edited https://github.com/llvm/llvm-project/pull/68485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-11 Thread Tianlan Zhou via cfe-commits
@@ -5678,10 +5678,15 @@ static ImplicitConversionSequence TryObjectArgumentInitialization( assert(FromType->isRecordType()); QualType ClassType = S.Context.getTypeDeclType(ActingContext); - // [class.dtor]p2: A destructor can be invoked for a const, volatile or - //

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

2024-01-11 Thread via cfe-commits
https://github.com/cor3ntin commented: Just a few nits, but I think it looks good https://github.com/llvm/llvm-project/pull/68485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-11 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/68485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-05 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea updated https://github.com/llvm/llvm-project/pull/68485 >From 03276260c48d9cafb2a0d80825156e77cdf02eba Mon Sep 17 00:00:00 2001 From: SuperSodaSea Date: Sat, 7 Oct 2023 21:05:17 +0800 Subject: [PATCH 01/10] [clang] static operators should evaluate object

[llvm] [clang-tools-extra] [clang] [clang] static operators should evaluate object argument (PR #68485)

2024-01-04 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea updated https://github.com/llvm/llvm-project/pull/68485 >From 03276260c48d9cafb2a0d80825156e77cdf02eba Mon Sep 17 00:00:00 2001 From: SuperSodaSea Date: Sat, 7 Oct 2023 21:05:17 +0800 Subject: [PATCH 1/7] [clang] static operators should evaluate object argument

[clang] [clang] static operators should evaluate object argument (PR #68485)

2024-01-04 Thread via cfe-commits
https://github.com/cor3ntin commented: I think this looks fine, once we have a release note https://github.com/llvm/llvm-project/pull/68485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] static operators should evaluate object argument (PR #68485)

2024-01-04 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: Ping. https://github.com/llvm/llvm-project/pull/68485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-12-14 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: Ping. https://github.com/llvm/llvm-project/pull/68485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-11-13 Thread Tianlan Zhou via cfe-commits
SuperSodaSea wrote: Ping @cor3ntin @shafik https://github.com/llvm/llvm-project/pull/68485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-11 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea updated https://github.com/llvm/llvm-project/pull/68485 >From 03276260c48d9cafb2a0d80825156e77cdf02eba Mon Sep 17 00:00:00 2001 From: SuperSodaSea Date: Sat, 7 Oct 2023 21:05:17 +0800 Subject: [PATCH 1/6] [clang] static operators should evaluate object argument

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-11 Thread Tianlan Zhou via cfe-commits
@@ -7806,7 +7806,8 @@ class ExprEvaluatorBase // Overloaded operator calls to member functions are represented as normal // calls with '*this' as the first argument. const CXXMethodDecl *MD = dyn_cast(FD); - if (MD &&

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-11 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea updated https://github.com/llvm/llvm-project/pull/68485 >From 03276260c48d9cafb2a0d80825156e77cdf02eba Mon Sep 17 00:00:00 2001 From: SuperSodaSea Date: Sat, 7 Oct 2023 21:05:17 +0800 Subject: [PATCH 1/5] [clang] static operators should evaluate object argument

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-10 Thread Shafik Yaghmour via cfe-commits
@@ -5536,10 +5538,24 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType, const CGCallee break; } } + +if (const auto *MD = +dyn_cast_if_present(OCE->getCalleeDecl()); +MD && MD->isStatic()) + StaticOperator = true; } -

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-10 Thread Shafik Yaghmour via cfe-commits
@@ -7806,7 +7806,8 @@ class ExprEvaluatorBase // Overloaded operator calls to member functions are represented as normal // calls with '*this' as the first argument. const CXXMethodDecl *MD = dyn_cast(FD); - if (MD &&

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-10 Thread Shafik Yaghmour via cfe-commits
@@ -5536,10 +5538,24 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType, const CGCallee break; } } + +if (const auto *MD = +dyn_cast_if_present(OCE->getCalleeDecl()); +MD && MD->isStatic()) + StaticOperator = true; } -

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-10 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea updated https://github.com/llvm/llvm-project/pull/68485 >From 03276260c48d9cafb2a0d80825156e77cdf02eba Mon Sep 17 00:00:00 2001 From: SuperSodaSea Date: Sat, 7 Oct 2023 21:05:17 +0800 Subject: [PATCH 1/4] [clang] static operators should evaluate object argument

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-10 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea updated https://github.com/llvm/llvm-project/pull/68485 >From 03276260c48d9cafb2a0d80825156e77cdf02eba Mon Sep 17 00:00:00 2001 From: SuperSodaSea Date: Sat, 7 Oct 2023 21:05:17 +0800 Subject: [PATCH 1/3] [clang] static operators should evaluate object argument

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-10 Thread via cfe-commits
@@ -14935,15 +14935,15 @@ ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, CXXMethodDecl *Method = cast(FnDecl); SmallVector MethodArgs; -// Handle 'this' parameter if the selected function is not static. +// Initialize

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-08 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea edited https://github.com/llvm/llvm-project/pull/68485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-08 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea updated https://github.com/llvm/llvm-project/pull/68485 >From 03276260c48d9cafb2a0d80825156e77cdf02eba Mon Sep 17 00:00:00 2001 From: SuperSodaSea Date: Sat, 7 Oct 2023 21:05:17 +0800 Subject: [PATCH 1/2] [clang] static operators should evaluate object argument

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-07 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea edited https://github.com/llvm/llvm-project/pull/68485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes Description clang don't evaluate the object argument of `static operator()` and `static operator[]` currently, for example: ```cpp #include iostream struct Foo { static int operator()(int x, int y) { std::cout

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-07 Thread Tianlan Zhou via cfe-commits
SuperSodaSea wrote: CC @dtcxzyw, @zygoloid https://github.com/llvm/llvm-project/pull/68485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-07 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea created https://github.com/llvm/llvm-project/pull/68485 Description clang don't evaluate the object argument of `static operator()` and `static operator[]` currently, for example: ```cpp #include struct Foo { static int operator()(int x, int y) {