[PATCH] D113799: ADT: Fix const-correctness of iterator facade

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 12 20:44:54 PST 2021


dexonsmith added a comment.

Thanks for the reviews! Pushed in 6b9b86db9dd974585a5c71cf2e5231d1e3385f7c <https://reviews.llvm.org/rG6b9b86db9dd974585a5c71cf2e5231d1e3385f7c>.



================
Comment at: llvm/unittests/ADT/IteratorTest.cpp:85
+// have the right constness, and/or make fields mutable.
+static_assert(&IntIterator::operator* == &IntIterator::operator*, "");
+static_assert(&IntIterator::operator-> == &IntIterator::operator->, "");
----------------
I ignored this `clang-format` suggestion since I find `&IntIterator::operator->== ...` harder to read than `&IntIterator::operator-> == ...`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113799/new/

https://reviews.llvm.org/D113799



More information about the llvm-commits mailing list