martong added inline comments.
================ Comment at: clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp:420-421 + // We should also allow defensive initialization of structs. + if (const auto *ILE = + dyn_cast<InitListExpr>(E->IgnoreParenCasts())) { + // We can use exactly the same logic here. ---------------- What about nested InitListExpr's? ``` std::array<int, 3> a1{ {1, 2, 3} }; ``` ``` VarDecl 0x561b200333a0 </home/egbomrt/tmp/aaa.cc:2:1, col:34> col:20 a1 'std::array<int, 3>':'std::array<int, 3>' listinit `-InitListExpr 0x561b20036d78 <col:22, col:34> 'std::array<int, 3>':'std::array<int, 3>' `-InitListExpr 0x561b20036dc0 <col:24, col:32> 'typename _AT_Type::_Type':'int [3]' |-IntegerLiteral 0x561b20033408 <col:25> 'int' 1 |-IntegerLiteral 0x561b20033428 <col:28> 'int' 2 `-IntegerLiteral 0x561b20033448 <col:31> 'int' 3 ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99262/new/ https://reviews.llvm.org/D99262 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits