r304322 - [CodeGen] Surround assertion with parens and format.

Davide Italiano via cfe-commits cfe-commits at lists.llvm.org
Wed May 31 11:51:37 PDT 2017


Author: davide
Date: Wed May 31 13:51:36 2017
New Revision: 304322

URL: http://llvm.org/viewvc/llvm-project?rev=304322&view=rev
Log:
[CodeGen] Surround assertion with parens and format.

This should placate GCC7 with -Werror.

Modified:
    cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=304322&r1=304321&r2=304322&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Wed May 31 13:51:36 2017
@@ -472,10 +472,10 @@ void CodeGenModule::Release() {
   // Width of wchar_t in bytes
   uint64_t WCharWidth =
       Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity();
-  assert(LangOpts.ShortWChar ||
-         llvm::TargetLibraryInfoImpl::getTargetWCharSize(Target.getTriple()) ==
-                 Target.getWCharWidth() / 8 &&
-             "LLVM wchar_t size out of sync");
+  assert((LangOpts.ShortWChar ||
+          llvm::TargetLibraryInfoImpl::getTargetWCharSize(Target.getTriple()) ==
+              Target.getWCharWidth() / 8) &&
+         "LLVM wchar_t size out of sync");
 
   // We need to record the widths of enums and wchar_t, so that we can generate
   // the correct build attributes in the ARM backend. wchar_size is also used by




More information about the cfe-commits mailing list