r.stahl added inline comments.

================
Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1723
+        if (const InitListExpr *InitList = dyn_cast<InitListExpr>(Init)) {
+          if (const Expr *FieldInit = InitList->getInit(FD->getFieldIndex())) {
+            if (Optional<SVal> V = svalBuilder.getConstantVal(FieldInit))
----------------
NoQ wrote:
> This method crashes when the index is out of range. Not sure - is it possible 
> to skip a few fields in the list? Would the list's AST automatically contain 
> any placeholders in this case?
Good catch, but I don't think this is an issue. When testing InitListExpr with 
missing inits, they get filled with ImplicitValueInitExpr.


https://reviews.llvm.org/D45774



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

Reply via email to