[PATCH] D127973: [analyzer] Eval construction of non POD type arrays.
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 29 08:58:49 PDT 2022
xazax.hun added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:493
+ if (auto DS = dyn_cast_or_null<DeclStmt>(Item.getStmtOrNull())) {
+ if (auto VD = dyn_cast_or_null<VarDecl>(DS->getSingleDecl()))
+ E = dyn_cast<CXXConstructExpr>(VD->getInit());
----------------
Hmm, when we are building our Cfgs, we explode DeclStatements with multiple declarations into separate DeclStatements, I'd expect `getSingleDecl` to never return `nullptr`. Maybe we can remove the `or_null`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127973/new/
https://reviews.llvm.org/D127973
More information about the cfe-commits
mailing list