balazske added a comment. In D81407#2080273 <https://reviews.llvm.org/D81407#2080273>, @Szelethus wrote:
> > If there are multiple resource leak paths for the same stream, only one wil > > be reported. > > What is the rationale behind this? Do all leaks from the same opening > describe the same kind of error? Is this based on observations on a codebase? The code was taken from `FuchsiaHandleChecker`. I do not know which approach to use, it may be that reporting all leak paths is better, these are really different problems. But I did not like getting many similar looking bug reports at a function that opens a file and then in various error cases stops the program by a "noreturn" function. At every such case a false positive resource leak is reported (I think it is OK to not close the file at stopping the program specially if there is some kind of error). Or the checker can be improved to find at a `checkDeadSymbols` if the program execution is stopping and do not report resource leak in that case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81407/new/ https://reviews.llvm.org/D81407 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits