[clang] [Clang] Skip type-aware operator delete resolution for incomplete pointee types (PR #213455)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 1 09:01:47 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 55905 tests passed
* 1453 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.SemaCXX/type-aware-delete-incomplete-type.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -std=c++17 -fsyntax-only -verify=warn C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -std=c++17 -fsyntax-only -verify=warn 'C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp'
# note: command had no output on stdout or stderr
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -std=c++23 -fsyntax-only -verify=warn C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -std=c++23 -fsyntax-only -verify=warn 'C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp'
# note: command had no output on stdout or stderr
# RUN: at line 3
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -std=c++26 -fsyntax-only -verify=err C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -std=c++26 -fsyntax-only -verify=err 'C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp'
# note: command had no output on stdout or stderr
# RUN: at line 4
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -std=c++17 -emit-llvm -o - C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -std=c++17 -emit-llvm -o - 'C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp:19:6: warning: type aware allocators are a Clang extension [-Wext-cxx-type-aware-allocators]
# | 19 | void operator delete(std::type_identity<T>, void *, size_t, std::align_val_t); // warn-warning {{type aware allocators are a Clang extension}} \
# | | ^
# | C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp:23:3: warning: deleting pointer to incomplete type 'Foo' is incompatible with C++2c and may cause undefined behavior [-Wdelete-incomplete]
# | 23 | delete o;
# | | ^ ~
# | C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp:6:7: note: forward declaration of 'Foo'
# | 6 | class Foo; // warn-note {{forward declaration of 'Foo'}} \
# | | ^
# | 2 warnings generated.
# `-----------------------------
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp:28:17: error: CHECK-LABEL: expected string not found in input
# | // CHECK-LABEL: define {{.*}} @_Z1fP3Foo
# | ^
# | <stdin>:1:1: note: scanning from here
# | ; ModuleID = 'C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp'
# | ^
# | <stdin>:7:1: note: possible intended match here
# | define dso_local void @"?f@@YAXPEAVFoo@@@Z"(ptr noundef %o) #0 {
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = 'C:\_work\llvm-project\llvm-project\clang\test\SemaCXX\type-aware-delete-incomplete-type.cpp'
# | label:28'0 { search range start (exclusive)
# | label:28'1 error: no match found in search range
# | 2: source_filename = "C:\\_work\\llvm-project\\llvm-project\\clang\\test\\SemaCXX\\type-aware-delete-incomplete-type.cpp"
# | 3: target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
# | 4: target triple = "x86_64-pc-windows-msvc"
# | 5:
# | 6: ; Function Attrs: mustprogress noinline nounwind optnone
# | 7: define dso_local void @"?f@@YAXPEAVFoo@@@Z"(ptr noundef %o) #0 {
# | label:28'2 ? possible intended match
# | 8: entry:
# | 9: %o.addr = alloca ptr, align 8
# | 10: store ptr %o, ptr %o.addr, align 8
# | 11: %0 = load ptr, ptr %o.addr, align 8
# | 12: %isnull = icmp eq ptr %0, null
# | .
# | .
# | .
# | 33:
# | 34: !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 24.0.0git (https://github.com/llvm/llvm-project 2c31120a653c6b3f861db50a09793fdbdc45716c)", isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, splitDebugInlining: false, nameTableKind: None)
# | 35: !1 = !DIFile(filename: "C:\\_work\\llvm-project\\llvm-project\\clang\\test\\SemaCXX\\<stdin>", directory: "")
# | 36: !2 = !{i32 2, !"Debug Info Version", i32 3}
# | 37: !3 = !{i32 1, !"MaxTLSAlign", i32 65536}
# | 38: !4 = !{!"clang version 24.0.0git (https://github.com/llvm/llvm-project 2c31120a653c6b3f861db50a09793fdbdc45716c)"}
# | label:28'3 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# 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/213455
More information about the cfe-commits
mailing list