Jake Egan 643b7bcdb4 [libc++] Fix simple cases of locale name construction
When using the following constructors:

```
locale(const locale& other, const char* std_name, category cat);
locale(const locale& other, const string& std_name, category cat);
locale(const locale& other, const locale& one, category cats);
```
The new locale name is always "*". Locale names formed from parts of two named locales (that is, C++ locales having names) are supposed to have names in turn (see C++20 subclause 28.3.1.1 [locale.general] paragraph 8). This patch fixes the name construction for cases when either of locales are unnamed, when the category is locale::none, and when the two locale names are the same.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D119441
2023-07-08 22:02:56 -04:00
..