efriedma added inline comments.

================
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1225
     assert(CAT && "can't emit array init for non-constant-bound array");
-    unsigned NumInitElements = ILE->getNumInits();
-    unsigned NumElements = CAT->getSize().getZExtValue();
+    uint64_t NumInitElements = ILE->getNumInits();
+    uint64_t NumElements = CAT->getSize().getZExtValue();
----------------
Note that getNumInits() itself is returning "unsigned".  (Looks easy to fix, 
though.)


================
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1265
+    
+    Inits.push_back(llvm::ConstantAggregateZero::get(FillerType));
+
----------------
Need to be careful here: in general, you can't just fill everything with zero.  
Need to check how getArrayFiller() is lowered.  (For example, consider `class 
X; int X::*a[10] = { 0 };`.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133570

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to