================ @@ -398,7 +400,7 @@ void StackAddrEscapeChecker::checkEndFunction(const ReturnStmt *RS, }(Referrer->getMemorySpace()); // This cast supposed to succeed. ---------------- steakhal wrote:
I was thinking about it once you raised this comment. To me, to have a proper diagnostic we need something that we can name here; and they are usually variables. Now, if we check and bail out if it's not a VarRegion, we would not get notified if we suddenly have some other value that we could cover but we don't. It took a long time to even hit this crash, so I don't think they are too frequent. So the question is which we prefer: - Crash (possible in the long future) to get notified or - Silently ignore these unthought, interesting cases for which we didn't account for If this would be a mission-critical software I'd vote for (2), but now I'm a bit hesitant in between the two options. Maybe, given that this is a core checker, we should lean towards gracefully handling this. WDYT? https://github.com/llvm/llvm-project/pull/66493 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits