Skip to content

[coverage] crash with ExprWithCleanups in if constexpr #80285

Closed
@hanickadot

Description

@hanickadot

Clang main and 18 crashes with this code: (-fprofile-instr-generate -fcoverage-mapping -std=c++17)

struct false_value {
	constexpr operator bool() {
		return false;
	}
};

void foo()
{
	if constexpr (false_value{}) { };
}

https://godbolt.org/z/833ej19rP

It's a bug in my recent change #78033 ... writing patch now, this is so it's visible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:codegenIR generation bugs: mangling, exceptions, etc.coveragecrashPrefer [crash-on-valid] or [crash-on-invalid]release:backport

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions