Skip to content

Commit

Permalink
[clang][analyzer]][NFC] Simplify method 'ensureStreamNonNull' of Stre…
Browse files Browse the repository at this point in the history
…amChecker (llvm#70927)

The passed in parameter 'State' is always identical to 'C.getState()'.
  • Loading branch information
benshi001 authored Nov 2, 2023
1 parent b28a296 commit e98f3bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ StreamChecker::ensureStreamNonNull(SVal StreamVal, const Expr *StreamE,
ConstraintManager &CM = C.getConstraintManager();

ProgramStateRef StateNotNull, StateNull;
std::tie(StateNotNull, StateNull) = CM.assumeDual(C.getState(), *Stream);
std::tie(StateNotNull, StateNull) = CM.assumeDual(State, *Stream);

if (!StateNotNull && StateNull) {
if (ExplodedNode *N = C.generateErrorNode(StateNull)) {
Expand Down

0 comments on commit e98f3bf

Please sign in to comment.