mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-02 10:16:06 +00:00

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