[clang-tools-extra] [clang-tidy] Skip user headers named like C headers in `modernize-deprecated-headers` (PR #195507)

via cfe-commits cfe-commits at lists.llvm.org
Sun May 3 01:02:19 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 3224 tests passed
* 7 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### Clangd Unit Tests
<details>
<summary>Clangd Unit Tests._/ClangdTests/DiagnosticsTest/ClangTidy</summary>

```
Script:
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/clangd/unittests/./ClangdTests --gtest_filter=DiagnosticsTest.ClangTidy
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp:358
Value of: TU.build().getDiagnostics()
Expected: has 6 elements and there exists some permutation of elements such that:
 - element #0 (Diag at 1:13-1:23 = [inclusion of deprecated C++ header 'assert.h'; consider using 'cassert' instead]) and (diag source (S: 2)) and (diag name (N: "modernize-deprecated-headers")) and (is an object whose given field has 1 element that Fix 1:13-1:23 => "<cassert>" = [change '"assert.h"' to '<cassert>']), and
 - element #1 Diag at 7:13-7:32 = [suspicious usage of 'sizeof(sizeof(...))'], and
 - element #2 (Diag at 6:20-6:22 = [side effects in the 1st macro argument 'X' are repeated in macro expansion]) and (diag source (S: 2)) and (diag name (N: "bugprone-macro-repeated-side-effects")) and (is an object whose given field has 1 element that Diag at 3:12-3:18 = [macro 'SQUARE' defined here]), and
 - element #3 (Diag at 4:8-4:12 = [use a trailing return type for this function]) and (diag source (S: 2)) and (diag name (N: "modernize-use-trailing-return-type")) and (is an object whose given field has 1 element that fix message (Message: "use a trailing return type for this function")), and
 - element #4 Diag at 15:9-15:12 = [function 'foo' is within a recursive call chain], and
 - element #5 Diag at 12:9-12:12 = [function 'bar' is within a recursive call chain]
  Actual: { [6:20-6:22] side effects in the 1st macro argument 'X' are repeated in macro expansion, notes: {[3:12-3:18] macro 'SQUARE' defined here}, [15:9-15:12] function 'foo' is within a recursive call chain, [12:9-12:12] function 'bar' is within a recursive call chain, notes: {[15:9-15:12] example recursive call chain, starting from function 'foo', [16:6-16:9] Frame #1: function 'foo' calls function 'bar' here:, [13:6-13:9] Frame #2: function 'bar' calls function 'foo' here:, [13:6-13:9] ... which was the starting point of the recursive call chain; there may be other cycles}, [4:8-4:12] use a trailing return type for this function, fixes: {use a trailing return type for this function {4:4-4:7 => "auto", 4:14-4:14 => " -> int"}}, [7:13-7:32] suspicious usage of 'sizeof(sizeof(...))' }, which has 5 elements


```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the cfe-commits mailing list