================
@@ -75,7 +75,9 @@ void DanglingPtrDeref::reportUseAfterScope(const MemRegion
*Region,
" after its lifetime ended."),
N);
BR->addVisitor<DanglingPtrDerefBRVisitor>(Region);
- bugreporter::trackExpressionValue(N, bugreporter::getDerefExpr(S), *BR);
+ if (S)
+ if (const Expr *DerefExpr = bugreporter::getDerefExpr(S))
+ bugreporter::trackExpressionValue(N, DerefExpr, *BR);
----------------
steakhal wrote:
In this case I think I'd prefer a brace around the outer `if`.
https://github.com/llvm/llvm-project/pull/211818
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits