Skip to content

Commit

Permalink
Revert D56591460: Multisect successfully blamed "D56591460: [folly][P…
Browse files Browse the repository at this point in the history
…R] Fix CodeQL C++ issues" for one test failure

Summary:
This diff reverts D56591460
D56591460: [folly][PR] Fix CodeQL C++ issues by Orvid causes the following test failure:

Tests affected:
- [fbsource//xplat/arfx/engine/plugins/impl/networking:networkingTestsHermesBytecodeAndroid-32bit - runAllTests (com.facebook.xplat.XplatTestRunner)](https://www.internalfb.com/intern/test/281475119430647/)

Here's the Multisect link:
https://www.internalfb.com/multisect/5114886
Here are the tasks that are relevant to this breakage:
T189434972: Test fbsource//xplat/arfx/engine/plugins/impl/networking:networkingTestsHermesBytecodeAndroid-32bit - runAllTests (com.facebook.xplat.XplatTestRunner) failing for ar_engine

The backout may land if someone accepts it.

If this diff has been generated in error, you can Commandeer and Abandon it.

Reviewed By: Orvid

Differential Revision: D57475591

fbshipit-source-id: 6e149571f6d424dfc16f241d9c1ff377a832bcf9
  • Loading branch information
generatedunixname89002005232357 authored and facebook-github-bot committed May 17, 2024
1 parent 3843f1c commit b5151a7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions third-party/folly/src/folly/ConstexprMath.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ constexpr auto& constexpr_iterated_squares_desc_2_v =
template <typename T, typename... Ts>
constexpr T constexpr_max(T a, Ts... ts) {
T list[] = {ts..., a}; // 0-length arrays are illegal
for (size_t i = 0; i < sizeof...(Ts); ++i) {
for (auto i = 0u; i < sizeof...(Ts); ++i) {
a = list[i] < a ? a : list[i];
}
return a;
Expand All @@ -260,7 +260,7 @@ constexpr T constexpr_max(T a, Ts... ts) {
template <typename T, typename... Ts>
constexpr T constexpr_min(T a, Ts... ts) {
T list[] = {ts..., a}; // 0-length arrays are illegal
for (size_t i = 0; i < sizeof...(Ts); ++i) {
for (auto i = 0u; i < sizeof...(Ts); ++i) {
a = list[i] < a ? list[i] : a;
}
return a;
Expand Down
2 changes: 1 addition & 1 deletion third-party/folly/src/folly/json/json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ struct Input {
}

void skipWhitespace() {
std::size_t index = 0;
unsigned index = 0;
while (true) {
while (index < range_.size() && range_[index] == ' ') {
index++;
Expand Down
12 changes: 6 additions & 6 deletions third-party/folly/src/folly/lang/ToAscii.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ using to_ascii_alphabet_upper = to_ascii_alphabet<true>;

namespace detail {

template <size_t Base, typename Alphabet>
template <uint64_t Base, typename Alphabet>
struct to_ascii_array {
using data_type_ = c_array<uint8_t, Base>;
static constexpr data_type_ data_() {
Expand All @@ -70,7 +70,7 @@ struct to_ascii_array {
return data.data[index];
}
};
template <size_t Base, typename Alphabet>
template <uint64_t Base, typename Alphabet>
alignas(kIsMobile ? sizeof(size_t) : hardware_constructive_interference_size)
typename to_ascii_array<Base, Alphabet>::data_type_ const
to_ascii_array<Base, Alphabet>::data =
Expand All @@ -89,7 +89,7 @@ extern template to_ascii_array<10, to_ascii_alphabet_upper>::data_type_ const
extern template to_ascii_array<16, to_ascii_alphabet_upper>::data_type_ const
to_ascii_array<16, to_ascii_alphabet_upper>::data;

template <size_t Base, typename Alphabet>
template <uint64_t Base, typename Alphabet>
struct to_ascii_table {
using data_type_ = c_array<uint16_t, Base * Base>;
static constexpr data_type_ data_() {
Expand All @@ -105,7 +105,7 @@ struct to_ascii_table {
// @lint-ignore CLANGTIDY
static data_type_ const data;
};
template <size_t Base, typename Alphabet>
template <uint64_t Base, typename Alphabet>
alignas(hardware_constructive_interference_size)
typename to_ascii_table<Base, Alphabet>::data_type_ const
to_ascii_table<Base, Alphabet>::data =
Expand All @@ -124,7 +124,7 @@ extern template to_ascii_table<10, to_ascii_alphabet_upper>::data_type_ const
extern template to_ascii_table<16, to_ascii_alphabet_upper>::data_type_ const
to_ascii_table<16, to_ascii_alphabet_upper>::data;

template <size_t Base, typename Int>
template <uint64_t Base, typename Int>
struct to_ascii_powers {
static constexpr size_t size_(Int v) {
return 1 + (v < Base ? 0 : size_(v / Base));
Expand All @@ -141,7 +141,7 @@ struct to_ascii_powers {
// @lint-ignore CLANGTIDY
static data_type_ const data;
};
template <size_t Base, typename Int>
template <uint64_t Base, typename Int>
alignas(hardware_constructive_interference_size)
typename to_ascii_powers<Base, Int>::data_type_ const
to_ascii_powers<Base, Int>::data = to_ascii_powers<Base, Int>::data_();
Expand Down

0 comments on commit b5151a7

Please sign in to comment.