Skip to content

Conversation

@StephanTLavavej
Copy link
Member

I'm working on an llvm-project update, and it has an allocator with a custom size type that found this bug. In this PR, I'm not bothering to add any test coverage since llvm-project will provide so much.

Clang error:

sstream(263,39): error: no matching function for call to '_Allocate_at_least_helper'

MSVC error:

sstream(263): error C2664: 'wchar_t *std::_Allocate_at_least_helper<test_allocator<wchar_t>>(_Alloc &,unsigned int &)': cannot convert argument 2 from 'size_t' to 'unsigned int &'

This code was using size_t since the beginning of history, we just missed the type mismatch in #3712 / #3864.

Elsewhere we're already using _Mysize_type.

Clang:
sstream(263,39): error: no matching function for call to '_Allocate_at_least_helper'

MSVC:
sstream(263): error C2664: 'wchar_t *std::_Allocate_at_least_helper<test_allocator<wchar_t>>(_Alloc &,unsigned int &)': cannot convert argument 2 from 'size_t' to 'unsigned int &'

Elsewhere we're already using `_Mysize_type`.
@StephanTLavavej StephanTLavavej added the bug Something isn't working label Nov 27, 2023
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner November 27, 2023 17:38
@StephanTLavavej StephanTLavavej self-assigned this Nov 29, 2023
@StephanTLavavej
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants