zaks.anna added a comment. > Side note: Has anybody ever considered just treating fopen and fclose like > malloc and free?
Yes, there are a few checkers that follow the same open/close rule and could in theory be merged together. ================ Comment at: cfe/trunk/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp:106 @@ -108,3 +105,3 @@ SimpleStreamChecker::SimpleStreamChecker() - : IIfopen(nullptr), IIfclose(nullptr) { + : OpenFn("fopen"), CloseFn("fclose", 1) { // Initialize the bug types. ---------------- ariccio wrote: > Why specify the RequiredArgs for `fclose`, and not `fopen`? Not sure. Maybe it's an omission. Repository: rL LLVM http://reviews.llvm.org/D15921 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits