[PATCH] D80699: [Analyzer][StreamChecker] Add check for pointer escape.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 4 06:36:36 PDT 2020


balazske marked 2 inline comments as done.
balazske added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:439-441
+  // Do not handle untracked stream. It is probably escaped.
+  if (!State->get<StreamMap>(StreamSym))
+    return;
----------------
Szelethus wrote:
> How does this interact with D78280?
That change needs to be updated after this. A new "escaped" stream state is needed to avoid recognizing an escaped stream again.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:952-954
+  for (InvalidatedSymbols::const_iterator I = Escaped.begin(),
+                                          E = Escaped.end();
+       I != E; ++I) {
----------------
Szelethus wrote:
> Foreach? 
The foreach type loop does work too, will be updated (this code is taken from another checker).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80699/new/

https://reviews.llvm.org/D80699





More information about the cfe-commits mailing list