[PATCH] D61485: Added an assert in `isConstantInitializer`: initializer lists must be in semantic form

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 9 23:38:34 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL360406: Added an assert in `isConstantInitializer`: initializer lists must be in… (authored by gribozavr, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D61485?vs=197949&id=198984#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61485/new/

https://reviews.llvm.org/D61485

Files:
  cfe/trunk/lib/AST/Expr.cpp


Index: cfe/trunk/lib/AST/Expr.cpp
===================================================================
--- cfe/trunk/lib/AST/Expr.cpp
+++ cfe/trunk/lib/AST/Expr.cpp
@@ -2947,6 +2947,7 @@
   }
   case InitListExprClass: {
     const InitListExpr *ILE = cast<InitListExpr>(this);
+    assert(ILE->isSemanticForm() && "InitListExpr must be in semantic form");
     if (ILE->getType()->isArrayType()) {
       unsigned numInits = ILE->getNumInits();
       for (unsigned i = 0; i < numInits; i++) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61485.198984.patch
Type: text/x-patch
Size: 494 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190510/1fb58744/attachment-0001.bin>


More information about the cfe-commits mailing list