Skip to content

[Sema] Relax a failing assertion in TransformBlockExpr #6298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

ahatanaka
Copy link

The assertion fails when the expression causing the this pointer to be captured is part of a constexpr if statement's branch and the branch gets discarded when the enclosing method is instantiated.

Note that the test case is added to CodeGen instead of Sema since the translation unit has to be free of errors in order for the assertion to be checked.

Differential Revision: https://reviews.llvm.org/D144016

(cherry picked from commit cda4a0e)

Conflicts:
clang/docs/ReleaseNotes.rst

The assertion fails when the expression causing the this pointer to be
captured is part of a constexpr if statement's branch and the branch
gets discarded when the enclosing method is instantiated.

Note that the test case is added to CodeGen instead of Sema since the
translation unit has to be free of errors in order for the assertion to
be checked.

Differential Revision: https://reviews.llvm.org/D144016

(cherry picked from commit cda4a0e)

Conflicts:
	clang/docs/ReleaseNotes.rst
@ahatanaka ahatanaka merged commit 4140a68 into stable/20221013 Feb 17, 2023
@ahatanaka ahatanaka deleted the constexpr-if-in-block branch February 17, 2023 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant