[clang] [Sema] Check arg count for builtins with CustomTypeChecking (PR #222841)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 10 22:50:12 PDT 2026
=?utf-8?b?yp/htJzJtOG0h3g=?= <imlunex2011 at gmail.com>,
=?utf-8?b?yp/htJzJtOG0h3g=?= <imlunex2011 at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/222841 at github.com>
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 56463 tests passed
* 1575 tests skipped
* 3 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.Sema/builtins-wasm.c</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -fsyntax-only -verify -triple wasm32 -target-feature +reference-types C:\_work\llvm-project\llvm-project\clang\test\Sema\builtins-wasm.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -fsyntax-only -verify -triple wasm32 -target-feature +reference-types 'C:\_work\llvm-project\llvm-project\clang\test\Sema\builtins-wasm.c'
# .---command stderr------------
# | error: 'expected-error' diagnostics expected but not seen:
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\builtins-wasm.c Line 10: too many arguments to function call, expected 0, have 1
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\builtins-wasm.c Line 11: too many arguments to function call, expected 0, have 1
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\builtins-wasm.c Line 12: too many arguments to function call, expected 1, have 2
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\builtins-wasm.c Line 23: too many arguments to function call, expected 1, have 2
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\builtins-wasm.c Line 30: too many arguments to function call, expected 3, have 4
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\builtins-wasm.c Line 40: too many arguments to function call, expected 4, have 5
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\builtins-wasm.c Line 50: too many arguments to function call, expected 5, have 6
# | error: 'expected-error' diagnostics seen but not expected:
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\builtins-wasm.c Line 10: too many arguments to function call, expected at most 0, have 1
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\builtins-wasm.c Line 11: too many arguments to function call, expected at most 0, have 1
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\builtins-wasm.c Line 12: too many arguments to function call, expected at most 1, have 2
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\builtins-wasm.c Line 23: too many arguments to function call, expected at most 1, have 2
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\builtins-wasm.c Line 30: too many arguments to function call, expected at most 3, have 4
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\builtins-wasm.c Line 40: too many arguments to function call, expected at most 4, have 5
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\builtins-wasm.c Line 50: too many arguments to function call, expected at most 5, have 6
# | 14 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.SemaCXX/amdgpu-feature-builtins-invalid-use.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -triple amdgpu9.00-amd-amdhsa -fsyntax-only -verify C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\amdgpu-feature-builtins-invalid-use.cpp
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -triple amdgpu9.00-amd-amdhsa -fsyntax-only -verify 'C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\amdgpu-feature-builtins-invalid-use.cpp'
# .---command stderr------------
# | error: 'expected-error' diagnostics expected but not seen:
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\amdgpu-feature-builtins-invalid-use.cpp Line 37 (directive at C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\amdgpu-feature-builtins-invalid-use.cpp:38): the argument to __builtin_amdgcn_is_invocable must be either a target agnostic builtin or an AMDGCN target specific builtin; {{.*__builtin_amdgcn_s_sleep_var.*}} is not valid
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\amdgpu-feature-builtins-invalid-use.cpp Line 39 (directive at C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\amdgpu-feature-builtins-invalid-use.cpp:40): the argument to __builtin_amdgcn_is_invocable must be either a target agnostic builtin or an AMDGCN target specific builtin; {{.*str.*}} is not valid
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\amdgpu-feature-builtins-invalid-use.cpp Line 41 (directive at C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\amdgpu-feature-builtins-invalid-use.cpp:42): the argument to __builtin_amdgcn_is_invocable must be either a target agnostic builtin or an AMDGCN target specific builtin; {{.*x.*}} is not valid
# | error: 'expected-error' diagnostics seen but not expected:
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\amdgpu-feature-builtins-invalid-use.cpp Line 37: too many arguments to function call, expected at most 0, have 1
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\amdgpu-feature-builtins-invalid-use.cpp Line 39: too many arguments to function call, expected at most 0, have 1
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\amdgpu-feature-builtins-invalid-use.cpp Line 41: too many arguments to function call, expected at most 0, have 1
# | 6 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.SemaSPIRV/BuiltIns/generic_cast_to_ptr_explicit.c</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -O1 -triple spirv64 -fsycl-is-device -x c++ -verify C:\_work\llvm-project\llvm-project\clang\test\SemaSPIRV\BuiltIns\generic_cast_to_ptr_explicit.c -o -
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -O1 -triple spirv64 -fsycl-is-device -x c++ -verify 'C:\_work\llvm-project\llvm-project\clang\test\SemaSPIRV\BuiltIns\generic_cast_to_ptr_explicit.c' -o -
# .---command stderr------------
# | error: 'expected-error' diagnostics expected but not seen:
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaSPIRV\BuiltIns\generic_cast_to_ptr_explicit.c Line 8 (directive at C:\_work\llvm-project\llvm-project\clang\test\SemaSPIRV\BuiltIns\generic_cast_to_ptr_explicit.c:9): too many arguments to function call, expected 2, have 3
# | error: 'expected-error' diagnostics seen but not expected:
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaSPIRV\BuiltIns\generic_cast_to_ptr_explicit.c Line 8: too many arguments to function call, expected at most 2, have 3
# | 2 errors generated.
# `-----------------------------
# 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/222841
More information about the cfe-commits
mailing list