[PATCH] D89528: [clang][test] Fix prefix operator++ signature in iterators
Endre Fülöp via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 19 01:01:50 PDT 2020
gamesh411 added a comment.
In D89528#2334795 <https://reviews.llvm.org/D89528#2334795>, @martong wrote:
> What is the context here? Did it cause any crash/bug or were you just reading through the code for a good night sleep? :D
Actually I was debugging thru iterator-related code and was making assumptions on the signature of operators.
Then I noticed the assymetry of return types in case of operator++ (fundamental types have ref return values in prefix case, but the simulator header did-not).
Note that the libc++ implementation uses reference return types:
https://github.com/llvm/llvm-project/blob/master/libcxx/include/iterator
So does the libstd++ implementation:
https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/bits/stl_iterator.h
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89528/new/
https://reviews.llvm.org/D89528
More information about the cfe-commits
mailing list