[clang] [libclang/python] Ignore our own DeprecationWarnings in CMake targets (PR #178631)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 29 07:26:10 PST 2026


Endilll wrote:

> @Endilll I opted to go with the interpreter flag here, so we don't have to add additional instructions to every test file.

I don't like deprecation warnings to be globally disabled _somewhere else_ away from the code, because I myself can forget why I see different output when I run them manually vs CMake target and CI. I also don't like how _all_ of the warnings are disabled this way, making it impossible for reviewers to see if we used deprecated APIs where we do not intend without running the tests locally.

> I also prefer keeping the warnings when running the tests directly, since it also helps verify that they're actually output as expected.

Checking that warnings are actually emitted is a good point. What I think we need is to both check that the warning was issued, and consume it, on case-by-case basis.

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


More information about the cfe-commits mailing list