martong added inline comments.
================ Comment at: clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp:456 + SVal RetVal) const { + const auto *ContReg = Cont.getAsRegion(); + if (!ContReg) ---------------- Just out of curiosity: How do we handle containers that do not have a contiguous memory region? Balanced trees, bucketed hash-maps, etc. ================ Comment at: clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp:482-483 + // of the container (the difference between its `begin()` and `end()` to + // this size. Function `relateSymbols()` returns null if it contradits + // the current size. + const auto CalcEnd = ---------------- How? I don't see how does it access the `size`. ================ Comment at: clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp:492 + } else { + if (CalcSize) { + // If the current size is a concrete integer, bind this to the return ---------------- What if we have both `RetSize` and `CalcSize`? Should we check their values for consistency? (And perhaps adding another sink node if we have inconsistency?) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76604/new/ https://reviews.llvm.org/D76604 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits