[cfe-commits] r167001 - /cfe/trunk/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp

Anna Zaks ganna at apple.com
Mon Oct 29 21:18:21 PDT 2012


Author: zaks
Date: Mon Oct 29 23:18:21 2012
New Revision: 167001

URL: http://llvm.org/viewvc/llvm-project?rev=167001&view=rev
Log:
[analyzer]SimpleStreamChecker: add a TODO for better leak report.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp?rev=167001&r1=167000&r2=167001&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp Mon Oct 29 23:18:21 2012
@@ -205,10 +205,12 @@
   }
 
   // Attach bug reports to the leak node.
+  // TODO: Identify the leaked file descriptor.
   for (llvm::SmallVector<SymbolRef, 2>::iterator
       I = LeakedStreams.begin(), E = LeakedStreams.end(); I != E; ++I) {
     BugReport *R = new BugReport(*LeakBugType,
         "Opened file is never closed; potential resource leak", ErrNode);
+    R->markInteresting(*I);
     C.EmitReport(R);
   }
 





More information about the cfe-commits mailing list