[PATCH] D106644: [clang][analyzer] Add standard streams to alpha.unix.Stream checker.

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 29 05:45:27 PDT 2021


Szelethus added a reviewer: vsavchenko.
Szelethus added a comment.

I like the idea, though I wonder whether `evalAssume` would be a better callback for this. That way, you'd only need to add an assumption when you reach a condition where one of the operands is standard.

Though it may be more trouble than its worth. I don't have strong feelings on this.



================
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:238
+
+SymbolRef findStdStream(StringRef StdName, CheckerContext &C) {
+  const LocationContext *LCtx = C.getLocationContext();
----------------
How about `getStdStreamSymbol`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106644



More information about the cfe-commits mailing list