[clang] [clang][ExprConstant] Reject integral casts of addr-label-diffs... (PR #171437)
LLVM Continuous Integration via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 25 23:28:59 PST 2025
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `llvm-clang-win-x-armv7l` running on `as-builder-1` while building `clang` at step 10 "test-check-clang".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/38/builds/7041
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 10 (test-check-clang) failure: Test just built components: check-clang completed (failure)
******************** TEST 'Clang :: AST/ast-dump-APValue-addrlabeldiff.c' FAILED ********************
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\buildbot\as-builder-1\x-armv7l\build\bin\clang.exe -cc1 -internal-isystem C:\buildbot\as-builder-1\x-armv7l\build\lib\clang\22\include -nostdsysteminc -std=c23 -ast-dump C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\AST\ast-dump-APValue-addrlabeldiff.c -ast-dump-filter Test | c:\buildbot\as-builder-1\x-armv7l\build\bin\filecheck.exe --strict-whitespace --match-full-lines C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\AST\ast-dump-APValue-addrlabeldiff.c
# executed command: 'c:\buildbot\as-builder-1\x-armv7l\build\bin\clang.exe' -cc1 -internal-isystem 'C:\buildbot\as-builder-1\x-armv7l\build\lib\clang\22\include' -nostdsysteminc -std=c23 -ast-dump 'C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\AST\ast-dump-APValue-addrlabeldiff.c' -ast-dump-filter Test
# .---command stderr------------
# | C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\AST\ast-dump-APValue-addrlabeldiff.c:15:23: error: constexpr variable 'ar' must be initialized by a constant expression
# | 15 | constexpr long long ar = &&l2 - &&l1;
# | | ^ ~~~~~~~~~~~
# | 1 error generated.
# `-----------------------------
# error: command failed with exit status: 1
# executed command: 'c:\buildbot\as-builder-1\x-armv7l\build\bin\filecheck.exe' --strict-whitespace --match-full-lines 'C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\AST\ast-dump-APValue-addrlabeldiff.c'
# .---command stderr------------
# | C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\AST\ast-dump-APValue-addrlabeldiff.c:13:10: error: CHECK: expected string not found in input
# | // CHECK: | |-value: AddrLabelDiff &&l2 - &&l1
# | ^
# | <stdin>:1:1: note: scanning from here
# | Dumping Test:
# | ^
# | <stdin>:2:89: note: possible intended match here
# | FunctionDecl 0x1d3001545e8 <C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\AST\ast-dump-APValue-addrlabeldiff.c:14:1, line:20:1> line:14:5 Test 'int (void)'
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\AST\ast-dump-APValue-addrlabeldiff.c
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: Dumping Test:
# | check:13'0 X~~~~~~~~~~~~~ error: no match found
# | 2: FunctionDecl 0x1d3001545e8 <C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\AST\ast-dump-APValue-addrlabeldiff.c:14:1, line:20:1> line:14:5 Test 'int (void)'
# | check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:13'1 ? possible intended match
# | 3: `-CompoundStmt 0x1d300473958 <col:16, line:20:1>
# | check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 4: |-DeclStmt 0x1d300473890 <line:15:3, col:39>
# | check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 5: | `-VarDecl 0x1d3001546f0 <col:3, col:37> col:23 ar 'const long long' constexpr cinit
# | check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 6: | `-ImplicitCastExpr 0x1d300473830 <col:28, col:37> 'long long' <IntegralCast>
# | check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 7: | `-BinaryOperator 0x1d300473810 <col:28, col:37> '__ptrdiff_t':'int' '-'
# | check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
...
```
</details>
https://github.com/llvm/llvm-project/pull/171437
More information about the cfe-commits
mailing list