This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Use L"cat" L"dog" when concatenating string literals.
ClosedPublic

Authored by STL_MSFT on Jun 24 2016, 6:29 PM.

Details

Summary

Use L"cat" L"dog" when concatenating string literals.

MSVC dislikes seeing L"23" "\x65F6". It's actually unclear to me what the Standard says here - I suspect that MSVC is correct. This depends on the phases of translation, and step 5 interprets string literals before step 6 concatenates them. I don't believe that the wideness of the first string literal is allowed to affect the second string literal before step 6 happens.

In any event, we can sidestep this arcane question by marking all of the string literals as wide.

Fixes MSVC "error C2022: '26102': too big for character".

Diff Detail

Event Timeline

STL_MSFT updated this revision to Diff 61871.Jun 24 2016, 6:29 PM
STL_MSFT retitled this revision from to [libcxx] [test] Use L"cat" L"dog" when concatenating string literals..
STL_MSFT updated this object.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
EricWF accepted this revision.Jun 26 2016, 1:01 PM
EricWF edited edge metadata.

r273821.

This revision is now accepted and ready to land.Jun 26 2016, 1:01 PM
EricWF closed this revision.Jun 26 2016, 1:01 PM