[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 21 17:15:27 PST 2025
================
@@ -1515,7 +1515,8 @@ void CStringChecker::evalCopyCommon(CheckerContext &C, const CallEvent &Call,
// conjure a return value for later.
if (lastElement.isUnknown())
lastElement = C.getSValBuilder().conjureSymbolVal(
- nullptr, Call.getOriginExpr(), LCtx, C.blockCount());
+ nullptr, Call.getCFGElementRef(), LCtx,
+ Call.getOriginExpr()->getType(), C.blockCount());
----------------
isuckatcs wrote:
```suggestion
Call.getOriginExpr()->getType(), C.blockCount());
```
`Call.getOriginExpr()` can return null, in which case we crash.
https://github.com/llvm/llvm-project/pull/128251
More information about the cfe-commits
mailing list