Open JVApen opened 8 years ago
A lot of the alpha static analyzer checks are not usable; some of them are checks that we are currently developing, some are known not to work due to limitations in the analyzer, some should be deleted.
Do you call clang to see the list of all checkers? Maybe we should not list them..
We don't list them by default. We only list them, when people ask to list all checks (clang-tidy -list-checks -checks=*
). However, running all checks on any code is a bad idea anyway.
Do you list them as available checkers? Most of them are not close to production quality.
Clang-tidy doesn't run alpha checkers by default, but they can be turned on, if the user wants to. I don't think we need to remove this possibility at all.
Clang-tidy should not expose alpha checkers. They are not supported; a lot of them have known bugs.
assigned to @tkremenek
Extended Description
In this reduced test-case, the check clang-analyzer-alpha.unix.Stream of clang-tidy is producing a false positive.
From my understanding, the std::ifstream class closes a file in its destructor (http://en.cppreference.com/w/cpp/io/basic_ifstream) Though this checker complains about potential resource leak (Opened File never closed.)
Full reproduction can be found in attachment. I've verified this bug with clang-tidy build against revision 262776 of trunk.