[clang-tools-extra] [clang-tidy][NFC] Use universal utility mock in testcases [1/N] (PR #185431)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 9 07:51:44 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 3101 tests passed
* 29 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### Clang Tools
<details>
<summary>Clang Tools.clang-tidy/checkers/bugprone/forwarding-reference-overload.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
C:/Python312/python.exe C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\clang-tidy\check_clang_tidy.py C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\bugprone\forwarding-reference-overload.cpp bugprone-forwarding-reference-overload C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp -- -- -isystem C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\clang-tidy\checkers\Inputs\Headers
# executed command: C:/Python312/python.exe 'C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\clang-tidy\check_clang_tidy.py' 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\bugprone\forwarding-reference-overload.cpp' bugprone-forwarding-reference-overload 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp' -- -- -isystem 'C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\clang-tidy\checkers\Inputs\Headers'
# .---command stdout------------
# | Running ['clang-tidy', '--experimental-custom-checks', 'C:\\_work\\llvm-project\\llvm-project\\build\\tools\\clang\\tools\\extra\\test\\clang-tidy\\checkers\\bugprone\\Output\\forwarding-reference-overload.cpp.tmp.cpp', '-fix', '--checks=-*,bugprone-forwarding-reference-overload', '--config={}', '--', '-isystem', 'C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\\clang-tidy\\checkers\\Inputs\\Headers', '-std=c++11', '-nostdinc++']...
# | clang-tidy --experimental-custom-checks C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp -fix --checks=-*,bugprone-forwarding-reference-overload --config={} -- -isystem C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\clang-tidy\checkers\Inputs\Headers -std=c++11 -nostdinc++ failed:
# | 15 warnings and 2 errors generated.
# |
# | Error while processing C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp.
# |
# | C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\clang-tidy\checkers\Inputs\Headers\utility:53:40: error: no type named 'type' in 'std::enable_if<false, int>'; 'enable_if' cannot be used to disable this declaration [clang-diagnostic-error]
# | 53 | using enable_if_t = typename enable_if<B, T>::type;
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:56:14: note: in instantiation of template type alias 'enable_if_t' requested here
# | 56 | std::enable_if_t<sizeof(int) < sizeof(long), int> a = 5, ...);
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:17:25: warning: constructor accepting a forwarding reference can hide the copy and move constructors [bugprone-forwarding-reference-overload]
# | 17 | template <typename T> Test1(T &&n);
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:43:3: note: copy constructor declared here
# | 43 | Test1(const Test1 &other) {}
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:44:3: note: copy constructor declared here
# | 44 | Test1(Test1 &other) {}
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:45:3: note: move constructor declared here
# | 45 | Test1(Test1 &&other) {}
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:23:25: warning: constructor accepting a forwarding reference can hide the copy and move constructors [bugprone-forwarding-reference-overload]
# | 23 | template <typename T> Test1(T &&n, int i = 5, ...);
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:43:3: note: copy constructor declared here
# | 43 | Test1(const Test1 &other) {}
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:44:3: note: copy constructor declared here
# | 44 | Test1(Test1 &other) {}
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:45:3: note: move constructor declared here
# | 45 | Test1(Test1 &&other) {}
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:30:3: warning: constructor accepting a forwarding reference can hide the copy and move constructors [bugprone-forwarding-reference-overload]
# | 30 | Test1(T &&n);
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:43:3: note: copy constructor declared here
# | 43 | Test1(const Test1 &other) {}
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:44:3: note: copy constructor declared here
# | 44 | Test1(Test1 &other) {}
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:45:3: note: move constructor declared here
# | 45 | Test1(Test1 &&other) {}
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:37:3: warning: constructor accepting a forwarding reference can hide the copy and move constructors [bugprone-forwarding-reference-overload]
# | 37 | Test1(T &&n, typename foo::enable_if<long>::type i = 5, ...);
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:43:3: note: copy constructor declared here
# | 43 | Test1(const Test1 &other) {}
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:44:3: note: copy constructor declared here
# | 44 | Test1(Test1 &other) {}
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:45:3: note: move constructor declared here
# | 45 | Test1(Test1 &&other) {}
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:55:3: warning: constructor accepting a forwarding reference can hide the copy and move constructors [bugprone-forwarding-reference-overload]
# | 55 | Test2(T &&n, int i = 5,
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:60:41: error: failed requirement 'sizeof(int) < sizeof(long)'; 'enable_if' cannot be used to disable this declaration [clang-diagnostic-error]
# | 60 | sizeof(int) < sizeof(long), double>::type &>
# | | ~~~~~~~~~~~~^~~~~~~~~~~~~~
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:61:3: warning: constructor accepting a forwarding reference can hide the copy and move constructors [bugprone-forwarding-reference-overload]
# | 61 | Test2(T &&n);
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:100:25: warning: constructor accepting a forwarding reference can hide the copy and move constructors [bugprone-forwarding-reference-overload]
# | 100 | template <typename T> Test4(T &&n);
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:103:3: note: copy constructor declared here
# | 103 | Test4(const Test4 &rhs);
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:118:25: warning: constructor accepting a forwarding reference can hide the move constructor [bugprone-forwarding-reference-overload]
# | 118 | template <typename T> Test6(T &&n);
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:121:3: note: move constructor declared here
# | 121 | Test6(Test6 &&rhs);
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:145:13: warning: constructor accepting a forwarding reference can hide the copy and move constructors [bugprone-forwarding-reference-overload]
# | 145 | constexpr variant(_Arg&& __arg) {}
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:189:3: warning: constructor accepting a forwarding reference can hide the copy and move constructors [bugprone-forwarding-reference-overload]
# | 189 | Test9(T &&t);
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:218:3: note: copy constructor declared here
# | 218 | Test9(const Test9 &other) = default;
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:219:3: note: move constructor declared here
# | 219 | Test9(Test9 &&other) = default;
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:197:3: warning: constructor accepting a forwarding reference can hide the copy and move constructors [bugprone-forwarding-reference-overload]
# | 197 | Test9(T &&t);
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:218:3: note: copy constructor declared here
# | 218 | Test9(const Test9 &other) = default;
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:219:3: note: move constructor declared here
# | 219 | Test9(Test9 &&other) = default;
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:205:3: warning: constructor accepting a forwarding reference can hide the copy and move constructors [bugprone-forwarding-reference-overload]
# | 205 | Test9(T &&t);
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:218:3: note: copy constructor declared here
# | 218 | Test9(const Test9 &other) = default;
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:219:3: note: move constructor declared here
# | 219 | Test9(Test9 &&other) = default;
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:213:3: warning: constructor accepting a forwarding reference can hide the copy and move constructors [bugprone-forwarding-reference-overload]
# | 213 | Test9(T &&t);
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:218:3: note: copy constructor declared here
# | 218 | Test9(const Test9 &other) = default;
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\forwarding-reference-overload.cpp.tmp.cpp:219:3: note: move constructor declared here
# | 219 | Test9(Test9 &&other) = default;
# | | ^
# | Suppressed 2 warnings (2 with check filters).
# |
# | Found compiler errors, but -fix-errors was not specified.
# |
# | Fixes have NOT been applied.
# |
# |
# |
# | Found compiler error(s).
# |
# |
# `-----------------------------
# .---command stderr------------
# | Traceback (most recent call last):
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 546, in <module>
# | main()
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 542, in main
# | CheckRunner(args, extra_args).run()
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 418, in run
# | clang_tidy_output = self.run_clang_tidy()
# | ^^^^^^^^^^^^^^^^^^^^^
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 281, in run_clang_tidy
# | clang_tidy_output = try_run(args)
# | ^^^^^^^^^^^^^
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 64, in try_run
# | process_output = subprocess.check_output(args, stderr=subprocess.STDOUT).decode(
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# | File "c:\python312\Lib\subprocess.py", line 466, in check_output
# | return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# | File "c:\python312\Lib\subprocess.py", line 571, in run
# | raise CalledProcessError(retcode, process.args,
# | subprocess.CalledProcessError: Command '['clang-tidy', '--experimental-custom-checks', 'C:\\_work\\llvm-project\\llvm-project\\build\\tools\\clang\\tools\\extra\\test\\clang-tidy\\checkers\\bugprone\\Output\\forwarding-reference-overload.cpp.tmp.cpp', '-fix', '--checks=-*,bugprone-forwarding-reference-overload', '--config={}', '--', '-isystem', 'C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\\clang-tidy\\checkers\\Inputs\\Headers', '-std=c++11', '-nostdinc++']' returned non-zero exit status 1.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</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/185431
More information about the cfe-commits
mailing list