Skip to content

Provide fresh DetachedCaptures for each nested fragment #299

Open
Endilll wants to merge 3 commits intolock3:cppxfrom
Endilll:fix-nested-fragments
Open

Provide fresh DetachedCaptures for each nested fragment #299
Endilll wants to merge 3 commits intolock3:cppxfrom
Endilll:fix-nested-fragments

Conversation

@Endilll
Copy link

@Endilll Endilll commented Jun 2, 2021

...like CXXFragmentParseRAII does with PendingUnquotes.

Otherwise nested fragments with captures fail at meta/clang/lib/Sema/SemaInject.cpp:2762:
void clang::Sema::attachCaptures(clang::CXXFragmentExpr *): Assertion 'E->getNumCaptures() == DetachedCaptures.size()' failed.

While this PR helps with nested fragments in this particular test, more complicated ones would still fail.

@katzdm
Copy link

katzdm commented Jun 27, 2025

@DarkArc Friendly ping 🤣

@Endilll
Copy link
Author

Endilll commented Jun 27, 2025

Looking back, this looks decent for my very first dive into Clang codebase.

@DarkArc
Copy link
Contributor

DarkArc commented Jun 27, 2025

I don't see any issues with the change; but it likely won't be merged because Lock3 has not been operating to my knowledge for some time.

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.

3 participants