Charusso accepted this revision. Charusso added inline comments.
================ Comment at: clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:451 + if (const auto *CallerCtor = dyn_cast_or_null<CXXConstructExpr>( + LCtx->getStackFrame()->getCallSite())) { + switch (CallerCtor->getConstructionKind()) { ---------------- NoQ wrote: > Charusso wrote: > > NoQ wrote: > > > Charusso wrote: > > > > May it is worth to handle the call outside to see whether it is > > > > non-null. > > > Mmm, what do you mean? > > It was that which is `null`-proof: > > ``` > > if (const Stmt *Outer = LCtx->getStackFrame()->getCallSite()) { > > const CXXConstructExpr *OuterCtor = dyn_cast<CXXConstructExpr>(Outer); > > if (OuterCtor) { > > // ... > > } > > } > > ``` > That's exactly what `_or_null` stands for in `dyn_cast_or_null`. Hm, I believe I had problems with that nullability a year ago, but it was long ago. Thanks for the clarification. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61816/new/ https://reviews.llvm.org/D61816 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits