steakhal added inline comments.
================ Comment at: clang/lib/StaticAnalyzer/Checkers/ErrnoChecker.cpp:68-71 + if (ErrnoLoc) { + ErrnoRegion = ErrnoLoc->getAsRegion(); + assert(ErrnoRegion && "The 'errno' location should be a memory region."); + } ---------------- NoQ wrote: > steakhal wrote: > > `Loc` always wrap a memregion of some sort. > Nope; null pointer is a `Loc` but doesn't correspond to any memory region. > > I usually print out doxygen inheritance graphs: > > - > https://clang.llvm.org/doxygen/classclang_1_1ento_1_1SVal__inherit__graph.png > - > https://clang.llvm.org/doxygen/classclang_1_1ento_1_1SymExpr__inherit__graph.png > - > https://clang.llvm.org/doxygen/classclang_1_1ento_1_1MemRegion__inherit__graph.png > > and hang them on the wall near my desk. They're really handy. > > > On a separate note, why not make this assertion part of `getErrnoLoc()`? ah true Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122150/new/ https://reviews.llvm.org/D122150 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits