Backed out changeset 9d5f4c9e6fdf (bug 1683213) for nsReadableUtils related bustage CLOSED TREE

This commit is contained in:
Bogdan Tara 2021-01-04 17:44:33 +02:00
parent 447823eecf
commit 0f44fec2ac
2 changed files with 7 additions and 6 deletions

View File

@ -98,12 +98,6 @@ check_and_add_gcc_warning("-Wfloat-zero-conversion")
# catches issues around loops
check_and_add_gcc_warning("-Wloop-analysis")
# Clang < 10 doesn't play nice with "auto&&" and non-reference ranges.
check_and_add_gcc_warning(
"-Wno-range-loop-analysis",
when=depends(c_compiler)(lambda c: c.type == "clang" and c.version < "10.0"),
)
# catches C++ version forward-compat issues
check_and_add_gcc_warning("-Wc++2a-compat", cxx_compiler)

View File

@ -452,6 +452,10 @@ void StringJoinAppend(
nsTSubstring<CharType>& aOutput,
const nsTLiteralString<CharType>& aSeparator, const InputRange& aInputRange,
Func&& aFunc = mozilla::detail::kStringJoinAppendDefault) {
#ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wrange-loop-analysis"
#endif
bool first = true;
for (const auto& item : aInputRange) {
if (first) {
@ -462,6 +466,9 @@ void StringJoinAppend(
aFunc(aOutput, item);
}
#ifdef __clang__
# pragma clang diagnostic pop
#endif
}
/**