================
@@ -2142,9 +2142,9 @@ Value *ScalarExprEmitter::VisitInitListExpr(InitListExpr 
*E) {
   bool Ignore = TestAndClearIgnoreResultAssign();
   (void)Ignore;
   unsigned NumInitElements = E->getNumInits();
-  assert(Ignore == false ||
-         (NumInitElements == 0 && E->getType()->isVoidType()) &&
-             "init list ignored");
+  assert((Ignore == false ||
+          (NumInitElements == 0 && E->getType()->isVoidType())) &&
+         "init list ignored");
----------------
erichkeane wrote:

That version ends up having a weird dead branch in non-asserts builds, and is 
problematic as `assert` is a macro.  I don't see the losing the cast as worth 
the additional risk/breaking up the purpose of the assert here, so I'm going to 
leave it.

https://github.com/llvm/llvm-project/pull/158635
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to