martong added inline comments.

================
Comment at: 
clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:932
+  const CXXConstructExpr *getInheritingConstructor() const {
+    return cast<CXXConstructExpr>(getInheritingStackFrame()->getCallSite());
+  }
----------------
martong wrote:
> This line causes a regression in our CTU jobs, because it seems `getCallSite` 
> can return with a null Stmt*. And then cast fires an assertion. I am going to 
> do a simple fix by changing `cast` to `cast_or_null` if there is no objection.
Hmm, it is not that simple unfortunately. The use of `cast_or_null` would 
result in a null dereference in `getNumArgs()`. I started to investigate how is 
it possible that `getCallSite()` returns with a nullptr.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74735/new/

https://reviews.llvm.org/D74735



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to