Skip to content

Conversation

krishna2803
Copy link
Contributor

@krishna2803 krishna2803 commented Jul 29, 2025

No description provided.

Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
@llvmbot llvmbot added the libc label Jul 29, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 29, 2025

@llvm/pr-subscribers-libc

Author: Krishna Pandey (krishna2803)

Changes

cc @lntue


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

1 Files Affected:

  • (modified) libc/src/__support/FPUtil/cast.h (+2-3)
diff --git a/libc/src/__support/FPUtil/cast.h b/libc/src/__support/FPUtil/cast.h
index e6fad1be7d053..719b1eaa97ff4 100644
--- a/libc/src/__support/FPUtil/cast.h
+++ b/libc/src/__support/FPUtil/cast.h
@@ -66,9 +66,8 @@ cast(InType x) {
         cpp::max(OutFPBits::FRACTION_LEN, InFPBits::FRACTION_LEN);
     DyadicFloat<cpp::bit_ceil(MAX_FRACTION_LEN)> xd(x);
     return xd.template as<OutType, /*ShouldSignalExceptions=*/true>();
-  }
-
-  return static_cast<OutType>(x);
+  } else
+    return static_cast<OutType>(x);
 }
 
 } // namespace LIBC_NAMESPACE::fputil

Copy link
Contributor

@michaelrj-google michaelrj-google left a comment

Choose a reason for hiding this comment

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

LGTM, feel free to fix the nit in a separate PR to unbreak the buildbots sooner.

Comment on lines 69 to 70
} else
return static_cast<OutType>(x);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: since the if has braces the else should too.

Co-authored-by: OverMighty <its.overmighty@gmail.com>
@lntue lntue merged commit 20d992d into llvm:main Jul 29, 2025
19 checks passed
@krishna2803 krishna2803 deleted the fix-aarch-buildbot branch July 29, 2025 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants