aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2024-01-30 13:38:18 -0500
committerAaron Ballman <aaron@aaronballman.com>2024-01-30 13:38:18 -0500
commit201eb2b5775cf193c97c60a5eb790003a1e6bedb (patch)
treef11f41d4e2747e9737dd1c7122a771f75df3e921 /clang/lib/Sema/SemaChecking.cpp
parent3477bcf4b94395e2c0ed77a139e54240cfe4f27d (diff)
downloadllvm-201eb2b5775cf193c97c60a5eb790003a1e6bedb.zip
llvm-201eb2b5775cf193c97c60a5eb790003a1e6bedb.tar.gz
llvm-201eb2b5775cf193c97c60a5eb790003a1e6bedb.tar.bz2
Revert "[clang] static operators should evaluate object argument (#68485)"
This reverts commit 30155fc0ef4fbdce2d79434aaae8d58b2fabb20a. It seems to have broken some tests in clangd: http://45.33.8.238/linux/129484/step_9.txt
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 7b877da..a9f0835 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -7611,8 +7611,9 @@ bool Sema::CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall,
unsigned NumArgs = TheCall->getNumArgs();
Expr *ImplicitThis = nullptr;
- if (IsMemberOperatorCall && !FDecl->hasCXXExplicitFunctionObjectParameter()) {
- // If this is a call to a member operator, hide the first
+ if (IsMemberOperatorCall && !FDecl->isStatic() &&
+ !FDecl->hasCXXExplicitFunctionObjectParameter()) {
+ // If this is a call to a non-static member operator, hide the first
// argument from checkCall.
// FIXME: Our choice of AST representation here is less than ideal.
ImplicitThis = Args[0];