steakhal added a comment. I see your point.
Would it report this issue? int test() { struct Foo foo = {0, 0}; // I would expect a warning here, that 'foo' was initialized but never read. (void)foo; return 0; } Only nits besides this. ================ Comment at: clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp:25 #include "llvm/ADT/BitVector.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" ---------------- I don't see any new code that would depend on this header. ================ Comment at: clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp:420-425 + if (const auto *ILE = + dyn_cast<InitListExpr>(E->IgnoreParenCasts())) + if (llvm::all_of(ILE->inits(), [this](const Expr *Init) { + return Init->isEvaluatable(Ctx); + })) + return; ---------------- Eh, the indentation looks horrible. It would be probably better to use braces here. 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