Skip to content
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

<format>: Fix handling of replacement field when format-spec is absent #4640

Merged
merged 5 commits into from
May 20, 2024

Conversation

frederick-vs-ja
Copy link
Contributor

Fixes #4636. Also fixes the runtime behavior - both output line in the reported example should be arg-id: 1, arg-id: 3.

I've verified that the example posted in #4078 still fails to compile (when using /utf-8 or a wchar_t variant). But I don't know how to test such error in the test suits of MSVC STL.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner April 29, 2024 17:25
@CaseyCarter CaseyCarter added bug Something isn't working format C++20/23 format labels Apr 29, 2024
@StephanTLavavej

This comment was marked as resolved.

And fix some `parse` functions in the test.
@StephanTLavavej StephanTLavavej self-assigned this Apr 30, 2024
return parse_ctx.end();
return parse_ctx.begin();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be non-functional, correct? It's a matter of if we "match" the closing '}' or not.

@StephanTLavavej StephanTLavavej removed their assignment May 16, 2024
@StephanTLavavej
Copy link
Member

Thanks! FYI @barcharcraz I pushed minor changes after you approved.

@StephanTLavavej StephanTLavavej self-assigned this May 17, 2024
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 14a90eb into microsoft:main May 20, 2024
39 checks passed
@StephanTLavavej
Copy link
Member

Thanks! Fewer correctness bugs, happier users!
📉 🐞
📈 😻

@frederick-vs-ja frederick-vs-ja deleted the fix-replacement-field branch May 20, 2024 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working format C++20/23 format
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

<format>: Call to next_arg_id may result in unexpected error (regression)
4 participants