projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48baf7a
)
[analyzer] Fix a bug in SimpleStreamChecker - return after sink.
author
Anna Zaks
<ganna@apple.com>
Wed, 31 Oct 2012 22:17:48 +0000
(22:17 +0000)
committer
Anna Zaks
<ganna@apple.com>
Wed, 31 Oct 2012 22:17:48 +0000
(22:17 +0000)
Thanks Ted.
llvm-svn: 167176
clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
b/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
index
4fe01c3
..
d62002c
100644
(file)
--- a/
clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
+++ b/
clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
@@
-126,8
+126,10
@@
void SimpleStreamChecker::checkPreStmt(const CallExpr *Call,
// Check if the stream has already been closed.
ProgramStateRef State = C.getState();
const StreamState *SS = State->get<StreamMap>(FileDesc);
- if (SS && SS->isClosed())
+ if (SS && SS->isClosed())
{
reportDoubleClose(FileDesc, Call, C);
+ return;
+ }
// Generate the next transition, in which the stream is closed.
State = State->set<StreamMap>(FileDesc, StreamState::getClosed());