https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146463
Both of these functions return void. >From ad23a71d5148d200f1db8c307ca3d60d1c229a56 Mon Sep 17 00:00:00 2001 From: Kazu Hirata <k...@google.com> Date: Mon, 30 Jun 2025 10:15:12 -0700 Subject: [PATCH] [CodeGen] Remove unnecessary casts (NFC) Both of these functions return void. --- clang/lib/CodeGen/CGStmtOpenMP.cpp | 2 +- clang/lib/CodeGen/ConstantInitBuilder.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index d9195d749e056..5822e0f6db89a 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -713,7 +713,7 @@ CodeGenFunction::GenerateOpenMPCapturedStmtFunction(const CapturedStmt &S, VLASizeMap[VLASizePair.second.first] = VLASizePair.second.second; PGO->assignRegionCounters(GlobalDecl(CD), F); CapturedStmtInfo->EmitBody(*this, CD->getBody()); - (void)LocalScope.ForceCleanup(); + LocalScope.ForceCleanup(); FinishFunction(CD->getBodyRBrace()); if (!NeedWrapperFunction) return F; diff --git a/clang/lib/CodeGen/ConstantInitBuilder.cpp b/clang/lib/CodeGen/ConstantInitBuilder.cpp index ce1fe137c1919..7b3e7aea0f647 100644 --- a/clang/lib/CodeGen/ConstantInitBuilder.cpp +++ b/clang/lib/CodeGen/ConstantInitBuilder.cpp @@ -160,7 +160,7 @@ ConstantAggregateBuilderBase::getAddrOfPosition(llvm::Type *type, nullptr, ""); Builder.SelfReferences.emplace_back(dummy); auto &entry = Builder.SelfReferences.back(); - (void)getGEPIndicesTo(entry.Indices, position + Begin); + getGEPIndicesTo(entry.Indices, position + Begin); return dummy; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits