[clang] [clang-tools-extra] [Sema][clangd] add noexcept to override functions during code completion (PR #75937)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 19 18:38:52 PST 2023


zyn0217 wrote:

Bonus: It appears that neither gcc nor clang implements a provision change from [CWG1351](https://cplusplus.github.io/CWG/issues/1351.html),

> [except.spec]p4
> ..., **unless the overriding function is defined as deleted.**

giving errors on the following code.

```cpp
struct B {
  virtual void h() noexcept = delete;
};

struct D: B {
  void h() = delete;            // Should be OK
};

int main() {
  D();
}
```
https://cpp2.godbolt.org/z/zvY17G6jr

https://github.com/llvm/llvm-project/pull/75937


More information about the cfe-commits mailing list