mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
SingleLinkedListIterator::operator++(int) shouldn't return a reference
The returned reference is to a local object. Instead, make a copy. Found by PVS-Studio. llvm-svn: 285603
This commit is contained in:
parent
064168a303
commit
af41691053
@ -672,7 +672,7 @@ namespace llvm {
|
||||
P = P->Next;
|
||||
return *this;
|
||||
}
|
||||
SingleLinkedListIterator<T> &operator++(int) {
|
||||
SingleLinkedListIterator<T> operator++(int) {
|
||||
SingleLinkedListIterator res = *this;
|
||||
++*this;
|
||||
return res;
|
||||
|
Loading…
Reference in New Issue
Block a user