[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 22:18:47 PST 2025
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `clang-armv8-quick` running on `linaro-clang-armv8-quick` while building `clang` at step 5 "ninja check 1".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/154/builds/25707
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: AST/ast-dump-APValue-addrlabeldiff.c' FAILED ********************
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/lib/clang/22/include -nostdsysteminc -std=c23 -ast-dump /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/AST/ast-dump-APValue-addrlabeldiff.c -ast-dump-filter Test | /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/FileCheck --strict-whitespace --match-full-lines /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/AST/ast-dump-APValue-addrlabeldiff.c
# executed command: /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/lib/clang/22/include -nostdsysteminc -std=c23 -ast-dump /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/AST/ast-dump-APValue-addrlabeldiff.c -ast-dump-filter Test
# .---command stderr------------
# | /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/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: /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/FileCheck --strict-whitespace --match-full-lines /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/AST/ast-dump-APValue-addrlabeldiff.c
# .---command stderr------------
# | /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/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:88: note: possible intended match here
# | FunctionDecl 0xde666e8 </home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/AST/ast-dump-APValue-addrlabeldiff.c:14:1, line:20:1> line:14:5 Test 'int (void)'
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/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 0xde666e8 </home/tcwg-buildbot/worker/clang-armv8-quick/llvm/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 0xde669a4 <col:16, line:20:1>
# | check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 4: |-DeclStmt 0xde66900 <line:15:3, col:39>
# | check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 5: | `-VarDecl 0xde667a0 <col:3, col:37> col:23 ar 'const long long' constexpr cinit
# | check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 6: | `-ImplicitCastExpr 0xde668a8 <col:28, col:37> 'long long' <IntegralCast>
# | check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 7: | `-BinaryOperator 0xde66890 <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