Replace x.reset(y.release()); with x = std::move(y); If y is rvalue, replace with x = y; instead. http://reviews.llvm.org/D6485 Patch by Alexey Sokolov! llvm-svn: 223460