Issue 134265
Summary Incorrect error reported for deleted function
Labels bug, clang
Assignees
Reporter ilovepi
    Some time since 0454dd8c48cd771478f1ae53330ba78e71bcd7c clang has started emitting an error for using a deleted function, except that function is not used. 

```
struct Foo {
  virtual ~Foo() {}
  static void operator delete[](void* ptr) = delete;
};
```
```
<source>:2:11: error: attempt to use a deleted function
    2 |   virtual ~Foo() {}
      | ^
<source>:3:15: note: 'operator delete[]' has been explicitly marked deleted here
    3 |   static void operator delete[](void* ptr) = delete;
 |               ^
1 error generated.
Compiler returned: 1
```


Godbolt: https://godbolt.org/z/aW31816h4

Surprisingly, this doesn't appear to manifest on godbolt w/ the assertions enabled, but in my local build (RelWithDebInfo + assertions) they do.

I'm bisecting now, but #133451 and #128866 seem like they could be related. 

cc: @momo5502 @Fznamznon 
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to