diff options
author | Rahul Joshi <rjoshi@nvidia.com> | 2025-05-21 13:19:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-21 13:19:09 -0700 |
commit | a76bf4da53182baace54fd69f9d38fc10e6b8e85 (patch) | |
tree | 0bddac47325742f488ab7fa8ee2e260a33d921d0 /llvm/lib/Support/APFloat.cpp | |
parent | 89d9a83b704a8f6b5bd64dac93095a9228c601d5 (diff) | |
download | llvm-a76bf4da53182baace54fd69f9d38fc10e6b8e85.zip llvm-a76bf4da53182baace54fd69f9d38fc10e6b8e85.tar.gz llvm-a76bf4da53182baace54fd69f9d38fc10e6b8e85.tar.bz2 |
[NFC][ADT/Support] Add {} for else when if body has {} (#140758)
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
-rw-r--r-- | llvm/lib/Support/APFloat.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp index e99649d..5e0b29f 100644 --- a/llvm/lib/Support/APFloat.cpp +++ b/llvm/lib/Support/APFloat.cpp @@ -893,8 +893,9 @@ writeSignedDecimal (char *dst, int value) if (value < 0) { *dst++ = '-'; dst = writeUnsignedDecimal(dst, -(unsigned) value); - } else + } else { dst = writeUnsignedDecimal(dst, value); + } return dst; } @@ -2814,8 +2815,8 @@ APFloat::opStatus IEEEFloat::convertToSignExtendedInteger( if (lost_fraction == lfExactlyZero) { *isExact = true; return opOK; - } else - return opInexact; + } + return opInexact; } /* Same as convertToSignExtendedInteger, except we provide @@ -3302,8 +3303,9 @@ bool IEEEFloat::convertFromStringSpecials(StringRef str) { if (str.size() > 1 && tolower(str[1]) == 'x') { str = str.drop_front(2); Radix = 16; - } else + } else { Radix = 8; + } } // Parse the payload and make the NaN. @@ -4529,8 +4531,9 @@ void IEEEFloat::toString(SmallVectorImpl<char> &Str, unsigned FormatPrecision, Str.append(FormatPrecision - 1, '0'); append(Str, "e+00"); } - } else + } else { Str.push_back('0'); + } return; case fcNormal: |