[PATCH] D69662: [Checkers] Avoid using evalCall in StreamChecker.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 4 01:09:11 PST 2019


balazske marked an inline comment as done.
balazske added a comment.

I wanted to remove `eval::Call` because only one checker can do this otherwise it is undefined behavior (according to the not very new "Analyzer Guide"). If it is essentially needed in this checker it will remain.



================
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:161
           .castAs<DefinedSVal>();
   state = state->BindExpr(CE, C.getLocationContext(), RetVal);
 
----------------
NoQ wrote:
> You're not allowed to do this in `checkPostCall` because other post-call checkers may have already read the return value.
Is it possible to do in `check::PreCall`? The value of the call expression is not used, only a state split is done.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69662





More information about the cfe-commits mailing list