[PATCH] D74735: [analyzer] Add support for CXXInheritedCtorInitExpr.
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 3 03:04:21 PST 2020
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
More information about the cfe-commits
mailing list