[clang] [clang-tools-extra] [clang][AST][clang-tidy] Do not set a reduced traversal scope in ASTM… (PR #132725)

kadir çetinkaya via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 25 01:36:33 PDT 2025


================
@@ -94,8 +94,6 @@ Improvements to clang-tidy
 - :program:`clang-tidy` no longer processes declarations from system headers
   by default, greatly improving performance. This behavior is disabled if the
   `SystemHeaders` option is enabled.
-  Note: this may lead to false negatives; downstream users may need to adjust
-  their checks to preserve existing behavior.
----------------
kadircet wrote:

> 1) users will not report issues, just silence them with the flag

I agree that this is a risk, but many people use major releases of clang-tidy, hence by the time we get feedback, it'll be impossible for those folks to pick up the fix. I am not sure if it's worth leaving it in broken state for these people until next release. But I am not really a decision maker here, so it's up to you folks.

> 3) we won't be able to unit test all checks with and without the flag

Well, we still have two modes today, it's just controlled by a different flag (warn in system headers on vs off) and we're not testing both. I think this is fine, as we know that `SkipSystemHeaders = True` is the only risky configuration. It should be fine to keep testing scenario the same, by default test with `SkipSystemHeaders = True` and only test for `SkipSystemHeaders = false` when we want to prevent regressions in the future.

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


More information about the cfe-commits mailing list