Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

We don't need const on a return type.

We don't need const on a return type.
@llvmbot llvmbot added the llvm:analysis Includes value tracking, cost tables and constant folding label Jul 4, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 4, 2025

@llvm/pr-subscribers-llvm-analysis

Author: Kazu Hirata (kazutakahirata)

Changes

We don't need const on a return type.


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

1 Files Affected:

  • (modified) llvm/lib/Analysis/ConstantFolding.cpp (+1-1)
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index af955f202ac28..6e469c034d9c8 100644
--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/lib/Analysis/ConstantFolding.cpp
@@ -1963,7 +1963,7 @@ inline bool llvm_fenv_testexcept() {
   return false;
 }
 
-static const APFloat FTZPreserveSign(const APFloat &V) {
+static APFloat FTZPreserveSign(const APFloat &V) {
   if (V.isDenormal())
     return APFloat::getZero(V.getSemantics(), V.isNegative());
   return V;

@kazutakahirata kazutakahirata merged commit 57cb926 into llvm:main Jul 5, 2025
11 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250704_drop_const_llvm_Analysis branch July 5, 2025 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llvm:analysis Includes value tracking, cost tables and constant folding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants