aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/FormatTestJava.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-10-18 10:16:57 -0700
committerGitHub <noreply@github.com>2025-10-18 10:16:57 -0700
commit49149261a908a7662bcbe36a73e632e84e726ddb (patch)
tree1bb99043a565eb137f510444ef9b63b086aa875e /clang/unittests/Format/FormatTestJava.cpp
parent5d22980ed46c175848e8f9e896216eb64e0f54a7 (diff)
downloadllvm-49149261a908a7662bcbe36a73e632e84e726ddb.zip
llvm-49149261a908a7662bcbe36a73e632e84e726ddb.tar.gz
llvm-49149261a908a7662bcbe36a73e632e84e726ddb.tar.bz2
[ADT, Support] Move llvm::numbers to STLForwardCompat.h (NFC) (#164053)
This patch moves llvm::numbers to STLForwardCompat.h for those constants defined in C++20 to facilitate the migration to C++20. "float" constants like ef and pif are not part of C++20, so they stay in MathExtras.h but are reimplemented in terms of e_v, pi_v, etc. sqrtpi and sqrtpif are not part of C++20, so they also stay in MathExtras.h, but they are redefined in terms of sqrtpi_v in the same style as other constants. I've verified the new C++17-style implementation to be bit-for-bit identical to the original definitions using static_assert: static_assert(e == llvm::numbers_new::e_v<double>); static_assert(ef == llvm::numbers_new::e_v<float>); before replacing the original definitions of e and ef in MathExtras.h, where llvm::numbers_new was a namesapce I used in STLForwardCompat.h for testing purposes.
Diffstat (limited to 'clang/unittests/Format/FormatTestJava.cpp')
0 files changed, 0 insertions, 0 deletions