[clang] [Clang][Sema] Warn on a function reference compared/converted to null (PR #204944)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 20 12:25:47 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 88368 tests passed
* 1666 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.CXX/expr/expr_unary/expr_unary_general/p1.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 -Wno-unused -fsyntax-only /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CXX/expr/expr.unary/expr.unary.general/p1.cpp -verify
# 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 -Wno-unused -fsyntax-only /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CXX/expr/expr.unary/expr.unary.general/p1.cpp -verify
# .---command stderr------------
# | error: 'expected-warning' diagnostics seen but not expected:
# | File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CXX/expr/expr.unary/expr.unary.general/p1.cpp Line 48: address of function 'ft' will always evaluate to 'true'
# | error: 'expected-note' diagnostics seen but not expected:
# | File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CXX/expr/expr.unary/expr.unary.general/p1.cpp Line 65: in instantiation of function template specialization 'dependent<A, B>' requested here
# | 2 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.SemaCXX/condition.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 -std=c++11 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/condition.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 -std=c++11 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/condition.cpp
# .---command stderr------------
# | error: 'expected-warning' diagnostics seen but not expected:
# | File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/SemaCXX/condition.cpp Line 59: address of function 'x' will always evaluate to 'true'
# | 1 error 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/204944
More information about the cfe-commits
mailing list