[llvm] 0a1c852 - [NFC][ADT] Fix assert message

Guillaume Chatelet via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 11:56:13 PDT 2022


Author: theidexisted
Date: 2022-09-13T18:55:57Z
New Revision: 0a1c8522f3f6994d699f2355b4ced0fabf27bfca

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

LOG: [NFC][ADT] Fix assert message

Reviewed By: gchatelet

Differential Revision: https://reviews.llvm.org/D129632

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/Bitfields.h b/llvm/include/llvm/ADT/Bitfields.h
index d93f6483fa527..18555e676e9d3 100644
--- a/llvm/include/llvm/ADT/Bitfields.h
+++ b/llvm/include/llvm/ADT/Bitfields.h
@@ -119,7 +119,7 @@ template <typename T, unsigned Bits> struct BitPatterns {
 /// The `pack` method also checks that the passed in `UserValue` is valid.
 template <typename T, unsigned Bits, bool = std::is_unsigned<T>::value>
 struct Compressor {
-  static_assert(std::is_unsigned<T>::value, "T is unsigned");
+  static_assert(std::is_unsigned<T>::value, "T must be unsigned");
   using BP = BitPatterns<T, Bits>;
 
   static T pack(T UserValue, T UserMaxValue) {
@@ -132,7 +132,7 @@ struct Compressor {
 };
 
 template <typename T, unsigned Bits> struct Compressor<T, Bits, false> {
-  static_assert(std::is_signed<T>::value, "T is signed");
+  static_assert(std::is_signed<T>::value, "T must be signed");
   using BP = BitPatterns<T, Bits>;
 
   static T pack(T UserValue, T UserMaxValue) {


        


More information about the llvm-commits mailing list