[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 7 10:19:09 PST 2024


https://github.com/PiotrZSL commented:

I like idea behind this check, and I think that there should be version of this check not only for raw pointers but also for optionals, smart pointers and iterators.

My main problem is that dataflow framework is slow and unstable, there are 20 issues open for an bugprone-unchecked-optional-access check that uses this framework and 19 issues for a framework alone. It crashes, it hangs and only cause problems.

Personally I would prefer check like this to be written in simpler way by using same method as bugprone-use-after-move is using. Even if it would find less issue, but at-least wouldn't force half of the projects to disable it due to crashes or long execution time.

https://github.com/llvm/llvm-project/pull/84166


More information about the cfe-commits mailing list