[cfe-commits] r110392 - /cfe/trunk/lib/Checker/StreamChecker.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Thu Aug 5 16:24:13 PDT 2010
Author: zhongxingxu
Date: Thu Aug 5 18:24:13 2010
New Revision: 110392
URL: http://llvm.org/viewvc/llvm-project?rev=110392&view=rev
Log:
Don't assert on a file stream if its state is not tracked. Fix pr7831.
Modified:
cfe/trunk/lib/Checker/StreamChecker.cpp
Modified: cfe/trunk/lib/Checker/StreamChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/StreamChecker.cpp?rev=110392&r1=110391&r2=110392&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/StreamChecker.cpp (original)
+++ cfe/trunk/lib/Checker/StreamChecker.cpp Thu Aug 5 18:24:13 2010
@@ -373,7 +373,10 @@
assert(Sym);
const StreamState *SS = state->get<StreamState>(Sym);
- assert(SS);
+
+ // If the file stream is not tracked, return.
+ if (!SS)
+ return state;
// Check: Double close a File Descriptor could cause undefined behaviour.
// Conforming to man-pages
More information about the cfe-commits
mailing list