[clang] [Clang][Sema] Fix crash in __builtin_dump_struct with immediate callables (PR #192880)
Vladislav Semykin via cfe-commits
cfe-commits at lists.llvm.org
Sat May 2 11:09:13 PDT 2026
ViNN280801 wrote:
> Moved from initial PR msg
## Testing
Build (Linux x86-64, Ubuntu 24.04, Clang built from this branch with assertions enabled):
```bash
cmake -S llvm -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS=clang \
-DLLVM_ENABLE_ASSERTIONS=ON
ninja -C build
```
### Regression testing
```bash
ninja -C build check-clang-sema
ninja -C build check-clang-sematemplate
ninja -C build check-clang-codegen
```
Output:
```log
ninja: Entering directory `build'
[0/1] Running lit suite /home/loveit0/Documents/Work/llvm-project/clang/test/Sema
llvm-lit: /home/loveit0/Documents/Work/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using clang: /home/loveit0/Documents/Work/llvm-project/build/bin/clang
llvm-lit: /home/loveit0/Documents/Work/llvm-project/llvm/utils/lit/lit/llvm/subst.py:130: note: Did not find cir-opt in /home/loveit0/Documents/Work/llvm-project/build/bin:/home/loveit0/Documents/Work/llvm-project/build/bin
Testing Time: 8.86s
Total Discovered Tests: 1348
Unsupported: 2 (0.15%)
Passed : 1346 (99.85%)
ninja: Entering directory `build'
[0/1] Running lit suite /home/loveit0/Documents/Work/llvm-project/clang/test/SemaTemplate
llvm-lit: /home/loveit0/Documents/Work/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using clang: /home/loveit0/Documents/Work/llvm-project/build/bin/clang
llvm-lit: /home/loveit0/Documents/Work/llvm-project/llvm/utils/lit/lit/llvm/subst.py:130: note: Did not find cir-opt in /home/loveit0/Documents/Work/llvm-project/build/bin:/home/loveit0/Documents/Work/llvm-project/build/bin
Testing Time: 1.35s
Total Discovered Tests: 323
Passed : 322 (99.69%)
Expectedly Failed: 1 (0.31%)
ninja: Entering directory `build'
[0/1] Running lit suite /home/loveit0/Documents/Work/llvm-project/clang/test/CodeGen
llvm-lit: /home/loveit0/Documents/Work/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using clang: /home/loveit0/Documents/Work/llvm-project/build/bin/clang
llvm-lit: /home/loveit0/Documents/Work/llvm-project/llvm/utils/lit/lit/llvm/subst.py:130: note: Did not find cir-opt in /home/loveit0/Documents/Work/llvm-project/build/bin:/home/loveit0/Documents/Work/llvm-project/build/bin
Testing Time: 182.36s
Total Discovered Tests: 6022
Unsupported : 5 (0.08%)
Passed : 6012 (99.83%)
Expectedly Failed: 5 (0.08%)
```
### New own tests
```bash
./build/bin/llvm-lit -v ./clang/test/SemaCXX/builtin-dump-struct-immediate.cpp && ./build/bin/llvm-lit -v ./clang/test/SemaCXX/builtin-dump-struct-immediate-clean.cpp
```
Output:
```log
llvm-lit: /home/loveit0/Documents/Work/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using clang: /home/loveit0/Documents/Work/llvm-project/build/bin/clang
llvm-lit: /home/loveit0/Documents/Work/llvm-project/llvm/utils/lit/lit/llvm/subst.py:130: note: Did not find cir-opt in /home/loveit0/Documents/Work/llvm-project/build/bin:/home/loveit0/Documents/Work/llvm-project/build/bin
-- Testing: 1 tests, 1 workers --
PASS: Clang :: SemaCXX/builtin-dump-struct-immediate.cpp (1 of 1)
Testing Time: 0.11s
Total Discovered Tests: 1
Passed: 1 (100.00%)
llvm-lit: /home/loveit0/Documents/Work/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using clang: /home/loveit0/Documents/Work/llvm-project/build/bin/clang
llvm-lit: /home/loveit0/Documents/Work/llvm-project/llvm/utils/lit/lit/llvm/subst.py:130: note: Did not find cir-opt in /home/loveit0/Documents/Work/llvm-project/build/bin:/home/loveit0/Documents/Work/llvm-project/build/bin
-- Testing: 1 tests, 1 workers --
PASS: Clang :: SemaCXX/builtin-dump-struct-immediate-clean.cpp (1 of 1)
Testing Time: 0.07s
Total Discovered Tests: 1
Passed: 1 (100.00%)
```
https://github.com/llvm/llvm-project/pull/192880
More information about the cfe-commits
mailing list