[clang] [clang] fix crash in friend definition (PR #186398)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 15 14:00:15 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 86961 tests passed
* 1325 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.CXX/class_access/class_friend/p6.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -fsyntax-only -verify /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CXX/class.access/class.friend/p6.cpp
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -fsyntax-only -verify /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CXX/class.access/class.friend/p6.cpp
# .---command stderr------------
# | error: 'expected-error' diagnostics seen but not expected:
# | File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CXX/class.access/class.friend/p6.cpp Line 36: no candidate function template was found for dependent friend function template specialization
# | 1 error generated.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.SemaCXX/friend.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -fsyntax-only -verify /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/friend.cpp -std=c++14
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -fsyntax-only -verify /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/friend.cpp -std=c++14
# .---command stderr------------
# | error: 'expected-error' diagnostics expected but not seen:
# | File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/friend.cpp Line 165: friend declaration of 'f' does not match any declaration in 'test9::C'
# | error: 'expected-error' diagnostics seen but not expected:
# | File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/friend.cpp Line 165: friend function definition cannot be qualified with 'C'
# | 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/186398
More information about the cfe-commits
mailing list