[clang] [clang][analyzer][NFC] Remove redundant code in StreamChecker (PR #71394)
Ben Shi via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 6 22:47:23 PST 2023
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/71394
>From 095c386c2a9a4be6bf87d36ed0081d3756c9624b Mon Sep 17 00:00:00 2001
From: Ben Shi <bennshi at tencent.com>
Date: Tue, 7 Nov 2023 14:11:37 +0800
Subject: [PATCH] [clang][analyzer][NFC] Remove redundant code in StreamChecker
---
clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp | 3 ---
1 file changed, 3 deletions(-)
diff --git a/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
index 898906977ba9bb6..9e3fc49ee0154ca 100644
--- a/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
@@ -1074,8 +1074,6 @@ ProgramStateRef StreamChecker::ensureStreamOpened(SVal StreamVal,
"Stream might be already closed. Causes undefined behaviour.", N));
return nullptr;
}
-
- return State;
}
if (SS->isOpenFailed()) {
@@ -1093,7 +1091,6 @@ ProgramStateRef StreamChecker::ensureStreamOpened(SVal StreamVal,
N));
return nullptr;
}
- return State;
}
return State;
More information about the cfe-commits
mailing list