================
@@ -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");
----------------
brunodf-snps wrote:

The following alternative is perhaps more clear, and allows to remove the 
`(void)Ignore` line from just above.

```suggestion
  if (Ignore)
    assert(NumInitElements == 0 && E->getType()->isVoidType()
           && "only ignore irrelevant init list");
```

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