Skip to content

A [[nonblocking]] destructor can trigger a bogus "missing exception specification" warning #111726

@dougsonos

Description

@dougsonos
class Foo {
public:
	Foo();
	
	void bar() [[clang::nonblocking]];
	
	~Foo() [[clang::nonblocking]];
};

void Foo::bar() // no diagnostic
{
}

Foo::~Foo() // error: '~Foo' is missing exception specification 'noexcept'
{
}

Seems to come from Sema::CheckEquivalentExceptionSpec. Something about the function effect being part of the type triggers this.

It's easily worked around by copying the attribute to the destructor's definition.

I can look at this; please assign to me.

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second party

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions