-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libcxx] [test] Make indentation more consistent in thousands_sep. NFC. #99844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This was made inconsistent recently in f114edd.
@llvm/pr-subscribers-libcxx Author: Martin Storsjö (mstorsjo) ChangesThis was made inconsistent recently in Full diff: https://github.com/llvm/llvm-project/pull/99844.diff 1 Files Affected:
diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
index f368b1069c063..850352b3bc1ec 100644
--- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
@@ -64,7 +64,7 @@ int main(int, char**)
std::locale l(LOCALE_fr_FR_UTF_8);
{
#if defined(_CS_GNU_LIBC_VERSION) || defined(_WIN32) || defined(_AIX)
- const char sep = ' ';
+ const char sep = ' ';
#else
const char sep = ',';
#endif
@@ -77,11 +77,11 @@ int main(int, char**)
#if defined(_CS_GNU_LIBC_VERSION)
const wchar_t wsep = glibc_version_less_than("2.27") ? L' ' : L'\u202f';
# elif defined(_AIX)
- const wchar_t wsep = L'\u202F';
+ const wchar_t wsep = L'\u202F';
# elif defined(_WIN32)
- const wchar_t wsep = L'\u00A0';
+ const wchar_t wsep = L'\u00A0';
# else
- const wchar_t wsep = L',';
+ const wchar_t wsep = L',';
# endif
typedef wchar_t C;
const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
|
You can test this locally with the following command:git-clang-format --diff 56ad7cc0126f9899fd884391cfa10b6359206c01 8ad6687a26d3bce221d9acd9ba2972d8df5c26d5 --extensions cpp -- libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp View the diff from clang-format here.diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
index 850352b3bc..f368b1069c 100644
--- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
@@ -64,7 +64,7 @@ int main(int, char**)
std::locale l(LOCALE_fr_FR_UTF_8);
{
#if defined(_CS_GNU_LIBC_VERSION) || defined(_WIN32) || defined(_AIX)
- const char sep = ' ';
+ const char sep = ' ';
#else
const char sep = ',';
#endif
@@ -77,11 +77,11 @@ int main(int, char**)
#if defined(_CS_GNU_LIBC_VERSION)
const wchar_t wsep = glibc_version_less_than("2.27") ? L' ' : L'\u202f';
# elif defined(_AIX)
- const wchar_t wsep = L'\u202F';
+ const wchar_t wsep = L'\u202F';
# elif defined(_WIN32)
- const wchar_t wsep = L'\u00A0';
+ const wchar_t wsep = L'\u00A0';
# else
- const wchar_t wsep = L',';
+ const wchar_t wsep = L',';
# endif
typedef wchar_t C;
const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
|
Ok, so apparently, the issue here is that the autoformatter is suggesting the visibily inconsistent indentation (these files seem to use 4 spaces indent), and due to ifdefs, the thing ends up incosistent/messy... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM!
…C. (#99844) Summary: This was made inconsistent recently in f114edd. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251124
This was made inconsistent recently in
f114edd.