[PATCH] D71152: [analyzer] Keep track of escaped locals.

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 6 15:30:14 PST 2019


xazax.hun created this revision.
xazax.hun added reviewers: NoQ, Szelethus, baloghadamsoftware, dcoughlin, haowei.
xazax.hun added a project: clang.
Herald added subscribers: Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet.
xazax.hun added a comment.

So some of the questions that came to my mind:

1. Should this be exposed to the checkers?
2. Where should we actually have this trait registered? ProgramState? ExprEngine? Both of them need access, and due to layering I feel like it cannot be in ExprEngine but I might be wrong.


This is working progress but I wanted to share early to discuss the direction.

This looks relatively painless so far, but note that the locals are not cleaned up from the state just yet.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71152

Files:
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
  clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
  clang/lib/StaticAnalyzer/Core/ProgramState.cpp
  clang/test/Analysis/symbol-escape.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71152.232663.patch
Type: text/x-patch
Size: 4045 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191206/3d9cc1ca/attachment.bin>


More information about the cfe-commits mailing list