[llvm] cd1f94c - [ADT] Add [[nodiscard]] to makeQuiet (NFC) (#161776)

via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 12 20:49:00 PDT 2025


Author: Kazu Hirata
Date: 2025-10-12T20:48:56-07:00
New Revision: cd1f94c249e59600a9aa7a42d1d7006f9b365f34

URL: https://github.com/llvm/llvm-project/commit/cd1f94c249e59600a9aa7a42d1d7006f9b365f34
DIFF: https://github.com/llvm/llvm-project/commit/cd1f94c249e59600a9aa7a42d1d7006f9b365f34.diff

LOG: [ADT] Add [[nodiscard]] to makeQuiet (NFC) (#161776)

FWIW, this [[nodiscard]] led to the discovery of #161625.

Added: 
    

Modified: 
    llvm/include/llvm/ADT/APFloat.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/APFloat.h b/llvm/include/llvm/ADT/APFloat.h
index 6bc62845fddf4..a1bfce7d1bd5a 100644
--- a/llvm/include/llvm/ADT/APFloat.h
+++ b/llvm/include/llvm/ADT/APFloat.h
@@ -1313,7 +1313,7 @@ class APFloat : public APFloatBase {
 
   /// Assuming this is an IEEE-754 NaN value, quiet its signaling bit.
   /// This preserves the sign and payload bits.
-  APFloat makeQuiet() const {
+  [[nodiscard]] APFloat makeQuiet() const {
     APFloat Result(*this);
     Result.getIEEE().makeQuiet();
     return Result;


        


More information about the llvm-commits mailing list