[clang-tools-extra] [clang-tidy] Added bugprone-unsequenced-global-accesses check (PR #130421)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 13 04:41:49 PDT 2025


vbvictor wrote:

Thank you for your long and detailed answer! Indeed, the check can benefit a lot from path-sensitive analysis:

- Easier traversing with less boilerplate code.
- Easier handling of edge-cases like struct fields and unions, support of local variables.
- Fewer false-positives with more positives.

So from my perspective, this check can live as a clang-tidy check. However, looking at all benefits of path-sensitive analysis of CSA, the check would look a _lot better_ as a CSA check. I understand that CSA checks might be harder to write since CSA itself has higher entry threshold than clang-tidy, but it's hard to give a thoughtful and careful review of such big clang-tidy check, especially that has non-trivial manual AST-visiting.


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


More information about the cfe-commits mailing list