@@ -15097,15 +15102,9 @@ ExprResult
Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc,
ExprValueKind VK = Expr::getValueKindForType(ResultTy);
ResultTy = ResultTy.getNonLValueExprType(Context);
-CallExpr *TheCall;
-if (Method->isInst
@@ -15097,15 +15102,9 @@ ExprResult
Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc,
ExprValueKind VK = Expr::getValueKindForType(ResultTy);
ResultTy = ResultTy.getNonLValueExprType(Context);
-CallExpr *TheCall;
-if (Method->isInst
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
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
argumen
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
argumen
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
@@ -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
- //
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
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
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
argumen
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
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
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm
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
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
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
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
@@ -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 && MD->isImplicitObjectMemberFunction()
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
@@ -5536,10 +5538,24 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType,
const CGCallee &OrigCallee
break;
}
}
+
+if (const auto *MD =
+dyn_cast_if_present(OCE->getCalleeDecl());
+MD && MD->isStatic())
+ StaticOperator = true
@@ -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 && MD->isImplicitObjectMemberFunction()
@@ -5536,10 +5538,24 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType,
const CGCallee &OrigCallee
break;
}
}
+
+if (const auto *MD =
+dyn_cast_if_present(OCE->getCalleeDecl());
+MD && MD->isStatic())
+ StaticOperator = true
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
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
@@ -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
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
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
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
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
struct Foo {
static int operator()(int x, int y) {
std::cout << "Foo:
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
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) {
30 matches
Mail list logo