This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Fix unrepresentable enum for clang-cl unstable ABI
ClosedPublic

Authored by bcraig on Jul 8 2017, 7:00 PM.

Details

Summary

When using LIBCXX_ABI_UNSTABLE=YES, clang-cl gave the following warning:

P:\llvm_master\src\llvm\projects\libcxx\include\string(683,51):
warning: enumerator value is not representable in the underlying type
'int' [-Wmicrosoft-enum-value]

Fixed by switching from enums to static const size_type.

Diff Detail

Event Timeline

bcraig created this revision.Jul 8 2017, 7:00 PM
EricWF edited edge metadata.Jul 9 2017, 3:13 PM

Maybe using a static const variable instead of an enum would work better? __long_mask should never actually be ODR used so a definition for it should never actually be needed.

bcraig updated this revision to Diff 105845.Jul 10 2017, 7:06 AM
bcraig edited the summary of this revision. (Show Details)

Switched to static consts

EricWF accepted this revision.Jul 11 2017, 6:05 PM

LGTM.

This revision is now accepted and ready to land.Jul 11 2017, 6:05 PM
bcraig closed this revision.Jul 12 2017, 11:48 AM