Skip to content

Conversation

kazutakahirata
Copy link
Contributor

@kazutakahirata kazutakahirata commented Aug 24, 2025

No description provided.

@llvmbot llvmbot added clang Clang issues not falling into any other category backend:RISC-V clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang:codegen IR generation bugs: mangling, exceptions, etc. HLSL HLSL Language Support clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html labels Aug 24, 2025
@llvmbot
Copy link
Member

llvmbot commented Aug 24, 2025

@llvm/pr-subscribers-hlsl
@llvm/pr-subscribers-backend-risc-v
@llvm/pr-subscribers-clang-codegen

@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)

Changes
  • [clang] Remove redundant control flow statements (NFC)
  • [FLowSensitive] Remove unused using decls (NFC)

Full diff: https://github.com/llvm/llvm-project/pull/155138.diff

4 Files Affected:

  • (modified) clang/lib/CodeGen/Targets/RISCV.cpp (-1)
  • (modified) clang/lib/Driver/Driver.cpp (-1)
  • (modified) clang/lib/Driver/ToolChains/HLSL.cpp (-1)
  • (modified) clang/unittests/Analysis/FlowSensitive/FormulaTest.cpp (-2)
diff --git a/clang/lib/CodeGen/Targets/RISCV.cpp b/clang/lib/CodeGen/Targets/RISCV.cpp
index cbb0255fdb03a..264595a6e4b76 100644
--- a/clang/lib/CodeGen/Targets/RISCV.cpp
+++ b/clang/lib/CodeGen/Targets/RISCV.cpp
@@ -955,7 +955,6 @@ void RISCVABIInfo::createCoercedStore(llvm::Value *Val, Address Dst,
       cast<llvm::FixedVectorType>(EltTy), Val, uint64_t(0));
   auto *I = CGF.Builder.CreateStore(Coerced, Dst, DestIsVolatile);
   CGF.addInstToCurrentSourceAtom(I, Val);
-  return;
 }
 
 namespace {
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index d682ffc832c83..34eaad43d6f79 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -4672,7 +4672,6 @@ void Driver::BuildDriverManagedModuleBuildActions(
     Compilation &C, llvm::opt::DerivedArgList &Args, const InputList &Inputs,
     ActionList &Actions) const {
   Diags.Report(diag::remark_performing_driver_managed_module_build);
-  return;
 }
 
 /// Returns the canonical name for the offloading architecture when using a HIP
diff --git a/clang/lib/Driver/ToolChains/HLSL.cpp b/clang/lib/Driver/ToolChains/HLSL.cpp
index 4fedb5dd0ac40..eaa7d736719b5 100644
--- a/clang/lib/Driver/ToolChains/HLSL.cpp
+++ b/clang/lib/Driver/ToolChains/HLSL.cpp
@@ -215,7 +215,6 @@ void getSpirvExtOperand(StringRef SpvExtensionArg, raw_ostream &out) {
     return;
   }
   out << SpvExtensionArg;
-  return;
 }
 
 SmallString<1024> getSpirvExtArg(ArrayRef<std::string> SpvExtensionArgs) {
diff --git a/clang/unittests/Analysis/FlowSensitive/FormulaTest.cpp b/clang/unittests/Analysis/FlowSensitive/FormulaTest.cpp
index cabcd59fffedc..db9c02854c7fa 100644
--- a/clang/unittests/Analysis/FlowSensitive/FormulaTest.cpp
+++ b/clang/unittests/Analysis/FlowSensitive/FormulaTest.cpp
@@ -22,8 +22,6 @@ using namespace dataflow;
 using ::llvm::Failed;
 using ::llvm::HasValue;
 using ::llvm::Succeeded;
-using ::testing::ElementsAre;
-using ::testing::IsEmpty;
 
 class SerializeFormulaTest : public ::testing::Test {
 protected:

Copy link
Contributor

@shiltian shiltian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title needs to be more specific.

@kazutakahirata kazutakahirata changed the title cleanup 20250823 ret clang [clang] Remove redundant control flow statements (NFC) Aug 24, 2025
@kazutakahirata
Copy link
Contributor Author

The title needs to be more specific.

Oops. Thank you for pointing this out.

@kazutakahirata kazutakahirata merged commit 970516d into llvm:main Aug 24, 2025
16 of 17 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250823_ret_clang branch August 24, 2025 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:RISC-V clang:codegen IR generation bugs: mangling, exceptions, etc. clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category HLSL HLSL Language Support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants