[clang-tools-extra] [clang-tidy] Add new check 'misc-static-initialization-cycle' (PR #175342)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 6 13:50:00 PST 2026


=?utf-8?q?Balázs_Kéri?= <balazs.keri at ericsson.com>,
=?utf-8?q?Balázs_Kéri?= <balazs.keri at ericsson.com>,
=?utf-8?q?Balázs_Kéri?= <balazs.keri at ericsson.com>,
=?utf-8?q?Balázs_Kéri?= <balazs.keri at ericsson.com>,
=?utf-8?q?Balázs_Kéri?= <balazs.keri at ericsson.com>,
=?utf-8?q?Balázs_Kéri?= <balazs.keri at ericsson.com>,
=?utf-8?q?Balázs_Kéri?= <balazs.keri at ericsson.com>,
=?utf-8?q?Balázs_Kéri?= <balazs.keri at ericsson.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/175342 at github.com>


https://github.com/vbvictor commented:

Thank you for working on this! Generally code/docs looks good.
Please add ReleaseNotes about the new check.

-----------------------------------------------------
In one of the comments I asked to add test case with more nested function calls and I wonder if we can print whole function/variable chain as notes to help users debug and fix warning. I suspect in real code bases it could be difficult to identify root cause if 10 functions are calling each other.

------------------------------------------------------
Also I worry a little about performance of this check.
Could you please try running this check on some codebases to evaluate potential FPs and measure time with `--enable-check-profile`.




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


More information about the cfe-commits mailing list