[clang] [analyzer] Detect leaks of stack addresses via output params, indirect globals 3/3 (PR #105648)
Arseniy Zaostrovnykh via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 27 07:43:37 PDT 2024
================
@@ -348,12 +357,27 @@ void StackAddrEscapeChecker::checkEndFunction(const ReturnStmt *RS,
ExplodedNode *Node = Ctx.getPredecessor();
+ bool ExitingTopFrame =
+ Ctx.getPredecessor()->getLocationContext()->inTopFrame();
+
+ if (ExitingTopFrame && Node->getLocation().getTag() &&
+ Node->getLocation().getTag()->getTagDescription() ==
----------------
necto wrote:
I've rewritten it with a direct pointer comparison: 532eea2
I think it is not worse and it won't trigger the string-typing thoughts when one reads to code.
Do you agree? I can revert it if it isn't going in the right direction
https://github.com/llvm/llvm-project/pull/105648
More information about the cfe-commits
mailing list