aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/ErrorTest.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2021-11-11 19:14:03 -0800
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2021-11-12 20:37:36 -0800
commit75c86c9935925f841c1c4e0396b701210358489a (patch)
treea565dee01229faaa9dc7ae6e29f324a1d88c1b5a /llvm/unittests/Support/ErrorTest.cpp
parent3129b3339ce133650b460a7e6b7199111f97bb4c (diff)
downloadllvm-75c86c9935925f841c1c4e0396b701210358489a.zip
llvm-75c86c9935925f841c1c4e0396b701210358489a.tar.gz
llvm-75c86c9935925f841c1c4e0396b701210358489a.tar.bz2
Support: Make VarStreamArrayIterator iterate over const values
VarStreamArrayIterator returns a reference to a just-computed internal value. Change it to iterate over `const ValueType` to avoid allowing clients to mutate the internal state, and to drop the non-`const`-qualified operator*(). The removed operator*() was from 175d70ee5c2f03f6 to get iterator_facade_base::operator->() working, and this fixes the root cause instead: setting `T` to `const ValueType` causes iterator_facade_base to infer `PointerT` as `const ValueType*`. Ironically, this is the last blocker for removing the const-incorrect overload of `iterator_facade_base::operator->()`, whose presence triggered adding the workaround in the first place :). Differential Revision: https://reviews.llvm.org/D113797
Diffstat (limited to 'llvm/unittests/Support/ErrorTest.cpp')
0 files changed, 0 insertions, 0 deletions