The idiom
for (auto i = n - n; i < n; i += 1)
was intended to automatically derive the type of i from n
(signed/unsigned int) and avoid the 'mixed signed/unsigned comparison'
warning. However, almost-always-auto was never used in the LLVM coding
style (although we used it in Polly for some time) and I did never
intended to use this idiom upstream.
PVS Studio may warns about this idiom as 'warning: both sides of
operator are equivalent [misc-redundant-expression]'.
Remove the use of auto and directly use unsigned.
Also see http://llvm.org/PR44768
isl::space MapSpace = FromSpace.map_from_domain_and_range(ToSpace);
isl::basic_map Result = isl::basic_map::universe(MapSpace);
- for (auto i = Dims1 - Dims1; i < Dims1; i += 1)
+ for (unsigned i = 0u; i < Dims1; i += 1)
Result = Result.equate(isl::dim::in, i, isl::dim::out, Dims2 + i);
- for (auto i = Dims2 - Dims2; i < Dims2; i += 1) {
+ for (unsigned i = 0u; i < Dims2; i += 1) {
Result = Result.equate(isl::dim::in, Dims1 + i, isl::dim::out, i);
}