[clang] [Clang] Fix crash when type-name is combined with class specifier in template argument (PR #187921)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 22 02:08:08 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 53352 tests passed
* 1038 tests skipped
* 6 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.C/C23/n2934.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\23\include -nostdsysteminc -ffreestanding -verify=expected,c2x -std=c2x -Wpre-c2x-compat C:\_work\llvm-project\llvm-project\clang\test\C\C23\n2934.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\23\include' -nostdsysteminc -ffreestanding -verify=expected,c2x -std=c2x -Wpre-c2x-compat 'C:\_work\llvm-project\llvm-project\clang\test\C\C23\n2934.c'
# note: command had no output on stdout or stderr
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -ffreestanding -verify=expected,c17 -std=c17 C:\_work\llvm-project\llvm-project\clang\test\C\C23\n2934.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\23\include' -nostdsysteminc -ffreestanding -verify=expected,c17 -std=c17 'C:\_work\llvm-project\llvm-project\clang\test\C\C23\n2934.c'
# .---command stderr------------
# | error: diagnostics with 'error' severity expected but not seen:
# | File C:\_work\llvm-project\llvm-project\clang\test\C\C23\n2934.c Line 11 'c17-error': unknown type name 'bool'
# | error: diagnostics with 'error' severity seen but not expected:
# | File C:\_work\llvm-project\llvm-project\clang\test\C\C23\n2934.c Line 8: cannot combine with previous '(error)' declaration specifier
# | File C:\_work\llvm-project\llvm-project\clang\test\C\C23\n2934.c Line 8: expected ';' after top level declarator
# | File C:\_work\llvm-project\llvm-project\clang\test\C\C23\n2934.c Line 13: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int
# | 4 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.Parser/recovery.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\23\include -nostdsysteminc -verify -std=c++11 -fms-extensions C:\_work\llvm-project\llvm-project\clang\test\Parser\recovery.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\23\include' -nostdsysteminc -verify -std=c++11 -fms-extensions 'C:\_work\llvm-project\llvm-project\clang\test\Parser\recovery.cpp'
# .---command stderr------------
# | error: 'expected-error' diagnostics expected but not seen:
# | File C:\_work\llvm-project\llvm-project\clang\test\Parser\recovery.cpp Line 213: expected identifier
# | File C:\_work\llvm-project\llvm-project\clang\test\Parser\recovery.cpp Line 215: expected identifier
# | error: 'expected-error' diagnostics seen but not expected:
# | File C:\_work\llvm-project\llvm-project\clang\test\Parser\recovery.cpp Line 213: cannot combine with previous '(error)' declaration specifier
# | File C:\_work\llvm-project\llvm-project\clang\test\Parser\recovery.cpp Line 215: cannot combine with previous '(error)' declaration specifier
# | File C:\_work\llvm-project\llvm-project\clang\test\Parser\recovery.cpp Line 215: expected unqualified-id
# | 5 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.Sema/c++-keyword-in-c.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\23\include -nostdsysteminc -fsyntax-only -verify -Wc++-keyword C:\_work\llvm-project\llvm-project\clang\test\Sema\c++-keyword-in-c.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\23\include' -nostdsysteminc -fsyntax-only -verify -Wc++-keyword 'C:\_work\llvm-project\llvm-project\clang\test\Sema\c++-keyword-in-c.c'
# note: command had no output on stdout or stderr
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -fsyntax-only -verify -Wc++-compat C:\_work\llvm-project\llvm-project\clang\test\Sema\c++-keyword-in-c.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\23\include' -nostdsysteminc -fsyntax-only -verify -Wc++-compat 'C:\_work\llvm-project\llvm-project\clang\test\Sema\c++-keyword-in-c.c'
# note: command had no output on stdout or stderr
# RUN: at line 3
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -fsyntax-only -verify=good C:\_work\llvm-project\llvm-project\clang\test\Sema\c++-keyword-in-c.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\23\include' -nostdsysteminc -fsyntax-only -verify=good 'C:\_work\llvm-project\llvm-project\clang\test\Sema\c++-keyword-in-c.c'
# note: command had no output on stdout or stderr
# RUN: at line 4
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -fsyntax-only -verify=cxx -x c++ -std=c++2c C:\_work\llvm-project\llvm-project\clang\test\Sema\c++-keyword-in-c.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\23\include' -nostdsysteminc -fsyntax-only -verify=cxx -x c++ -std=c++2c 'C:\_work\llvm-project\llvm-project\clang\test\Sema\c++-keyword-in-c.c'
# .---command stderr------------
# | error: 'cxx-error' diagnostics expected but not seen:
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\c++-keyword-in-c.c Line 12: declaration of anonymous class must be a definition
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\c++-keyword-in-c.c Line 91: declaration of anonymous class must be a definition
# | error: 'cxx-error' diagnostics seen but not expected:
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\c++-keyword-in-c.c Line 12: cannot combine with previous 'int' declaration specifier
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\c++-keyword-in-c.c Line 91: cannot combine with previous 'int' declaration specifier
# | error: 'cxx-warning' diagnostics expected but not seen:
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\c++-keyword-in-c.c Line 12: declaration does not declare anything
# | File C:\_work\llvm-project\llvm-project\clang\test\Sema\c++-keyword-in-c.c Line 91: declaration does not declare anything
# | 6 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.SemaCXX/PR9460.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\23\include -nostdsysteminc -fsyntax-only -verify C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\PR9460.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\23\include' -nostdsysteminc -fsyntax-only -verify 'C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\PR9460.cpp'
# .---command stderr------------
# | error: 'expected-error' diagnostics expected but not seen:
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\PR9460.cpp Line 14: a type specifier is required
# | error: 'expected-error' diagnostics seen but not expected:
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\PR9460.cpp Line 13: expected ')'
# | error: 'expected-note' diagnostics seen but not expected:
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\PR9460.cpp Line 12: to match this '('
# | 3 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.SemaCXX/invalid-template-params.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\23\include -nostdsysteminc -fsyntax-only -std=c++11 -verify C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\invalid-template-params.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\23\include' -nostdsysteminc -fsyntax-only -std=c++11 -verify 'C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\invalid-template-params.cpp'
# .---command stderr------------
# | error: 'expected-error' diagnostics expected but not seen:
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\invalid-template-params.cpp Line 17: 'S0' cannot be defined in a type specifier
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\invalid-template-params.cpp Line 20: expected '(' for function-style cast or type construction
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\invalid-template-params.cpp Line 20 (directive at C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\invalid-template-params.cpp:21): expected expression
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\invalid-template-params.cpp Line 22: expected member name or ';' after declaration specifiers
# | error: 'expected-error' diagnostics seen but not expected:
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\invalid-template-params.cpp Line 17: cannot combine with previous 'type-name' declaration specifier
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\invalid-template-params.cpp Line 22: no template named 'S0'
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\invalid-template-params.cpp Line 20: no template named 'S0'
# | 7 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.SemaCXX/rdar42746401.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\23\include -nostdsysteminc -fsyntax-only -verify C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\rdar42746401.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\23\include' -nostdsysteminc -fsyntax-only -verify 'C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\rdar42746401.cpp'
# .---command stderr------------
# | error: 'expected-error' diagnostics expected but not seen:
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\rdar42746401.cpp Line 7: expected unqualified-id
# | error: 'expected-error' diagnostics seen but not expected:
# | File C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\rdar42746401.cpp Line 7: cannot combine with previous 'type-name' declaration specifier
# | 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/187921
More information about the cfe-commits
mailing list