NFC: Use ValueOfRange instead of T in Diagnostic::appendRange.
authorRiver Riddle <riverriddle@google.com>
Wed, 24 Jul 2019 23:41:11 +0000 (16:41 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Wed, 24 Jul 2019 23:41:48 +0000 (16:41 -0700)
For iterator_range, T is often the name of another iterator type and not the the value of the range.

PiperOrigin-RevId: 259843446

mlir/include/mlir/IR/Diagnostics.h

index e759c7c..b9621b6 100644 (file)
@@ -251,7 +251,8 @@ public:
   template <typename T, template <typename> class Container>
   Diagnostic &appendRange(const Container<T> &c, const char *delim = ", ") {
     interleave(
-        c, [&](T a) { *this << a; }, [&]() { *this << delim; });
+        c, [&](const detail::ValueOfRange<Container<T>> &a) { *this << a; },
+        [&]() { *this << delim; });
     return *this;
   }