[PATCH] D75163: [analyzer][StreamChecker] Adding precall and refactoring.

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 5 03:18:59 PST 2020


Szelethus added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:64-70
+/// Get the value of the stream argument out of the passed call event.
+/// The call should contain a function that is described by Desc.
+SVal getStreamArg(const FnDescription *Desc, const CallEvent &Call) {
+  assert(Desc && Desc->StreamArgNo != ArgNone &&
+         "Try to get a non-existing stream argument.");
+  return Call.getArgSVal(Desc->StreamArgNo);
+}
----------------
balazske wrote:
> Szelethus wrote:
> > You could make this a method of `FnDescription`.
> Originally I wanted it too but there is no strong relation to it, somehow I like better to have it as separate function.
Okay, I'll leave that to you.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75163





More information about the cfe-commits mailing list