r270983 - Convert assert to static_assert. NFC.

Benjamin Kramer via cfe-commits cfe-commits at lists.llvm.org
Fri May 27 04:49:06 PDT 2016


Author: d0k
Date: Fri May 27 06:48:53 2016
New Revision: 270983

URL: http://llvm.org/viewvc/llvm-project?rev=270983&view=rev
Log:
Convert assert to static_assert. NFC.

Modified:
    cfe/trunk/include/clang/AST/Type.h

Modified: cfe/trunk/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=270983&r1=270982&r2=270983&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/trunk/include/clang/AST/Type.h Fri May 27 06:48:53 2016
@@ -5357,7 +5357,8 @@ inline void QualType::removeLocalVolatil
 
 inline void QualType::removeLocalCVRQualifiers(unsigned Mask) {
   assert(!(Mask & ~Qualifiers::CVRMask) && "mask has non-CVR bits");
-  assert((int)Qualifiers::CVRMask == (int)Qualifiers::FastMask);
+  static_assert((int)Qualifiers::CVRMask == (int)Qualifiers::FastMask,
+                "Fast bits differ from CVR bits!");
 
   // Fast path: we don't need to touch the slow qualifiers.
   removeLocalFastQualifiers(Mask);




More information about the cfe-commits mailing list