================ @@ -10,6 +10,50 @@ #include "test/UnitTest/Test.h" +#include "src/__support/OSUtil/io.h" +#include "src/__support/integer_to_string.h" +using namespace LIBC_NAMESPACE; + +namespace { + +void nl() { write_to_stderr("\n"); } +void dump(const char *s) { + write_to_stderr(s); + nl(); +} + +void dump(int32_t s) { ---------------- lntue wrote:
Probably it's better to do: ``` template <typename T> cpp::enable_if_t<cpp::is_integral_v<T>, void> dump(T s) { auto x = IntegerToString<T>(s); write_to_stderr(x.view()); nl(); } ``` Then all the usages below could be changed to `dump(s.*);` https://github.com/llvm/llvm-project/pull/93362 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits