================
@@ -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);
----------------
benedekaibas wrote:

Yes, I agree, that it is needed. Added here: 
[61322cc](https://github.com/llvm/llvm-project/pull/211818/commits/61322cc7594be0903821ecffb3a84334a0cf0435)

https://github.com/llvm/llvm-project/pull/211818
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to