Skip to content

Provide fresh DetachedCaptures for each nested fragment - #299

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

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

Conversation

@Endilll

@Endilll Endilll commented Jun 2, 2021

Copy link
Copy Markdown

...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

katzdm commented Jun 27, 2025

Copy link
Copy Markdown

@DarkArc Friendly ping 🤣

@Endilll

Endilll commented Jun 27, 2025

Copy link
Copy Markdown
Author

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

@DarkArc

DarkArc commented Jun 27, 2025

Copy link
Copy Markdown
Contributor

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