SingleLinkedListIterator::operator++(int) shouldn't return a reference
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 31 Oct 2016 17:20:43 +0000 (17:20 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 31 Oct 2016 17:20:43 +0000 (17:20 +0000)
commit8a92dcc53b2d0225490b6b6eb22ed500defc688d
tree87eea9599badd98e165ec51676ef14add0b16da4
parent3aa049102fd0e80600622b29fde5c973b6138cf4
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
llvm/include/llvm/CodeGen/LiveInterval.h