[clang] [Sema] Remove an unnecessary cast (NFC) (PR #146703)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 2 07:28:26 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
The only use of Receiver is to initialize RecExpr. This patch renames
Receiver to RecExpr while removing the cast statement.
---
Full diff: https://github.com/llvm/llvm-project/pull/146703.diff
1 Files Affected:
- (modified) clang/lib/Sema/SemaCodeComplete.cpp (+1-3)
``````````diff
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) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/146703
More information about the cfe-commits
mailing list