[clang] [Sema] Remove an unnecessary cast (NFC) (PR #146703)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 2 09:29:15 PDT 2025
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/146703
>From a3d3b9476d01b12ce0557465e99f8f85efe9e0fc Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 1 Jul 2025 20:54:12 -0700
Subject: [PATCH] [Sema] Remove an unnecessary cast (NFC)
The only use of Receiver is to initialize RecExpr. This patch renames
Receiver to RecExpr while removing the cast statement.
---
clang/lib/Sema/SemaCodeComplete.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index b5d4a94da83df..cc361726c1cde 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -8499,13 +8499,11 @@ void SemaCodeCompletion::CodeCompleteObjCClassMessage(
}
void SemaCodeCompletion::CodeCompleteObjCInstanceMessage(
- Scope *S, Expr *Receiver, ArrayRef<const IdentifierInfo *> SelIdents,
+ Scope *S, Expr *RecExpr, ArrayRef<const IdentifierInfo *> SelIdents,
bool AtArgumentExpression, ObjCInterfaceDecl *Super) {
typedef CodeCompletionResult Result;
ASTContext &Context = getASTContext();
- Expr *RecExpr = static_cast<Expr *>(Receiver);
-
// If necessary, apply function/array conversion to the receiver.
// C99 6.7.5.3p[7,8].
if (RecExpr) {
More information about the cfe-commits
mailing list