[clang-tools-extra] r339785 - [clang-doc] Explicitly cast to unique_ptr
Julie Hockett via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 15 09:18:46 PDT 2018
Author: juliehockett
Date: Wed Aug 15 09:18:46 2018
New Revision: 339785
URL: http://llvm.org/viewvc/llvm-project?rev=339785&view=rev
Log:
[clang-doc] Explicitly cast to unique_ptr
Older compilers don't like the implicit cast & move when returning a
unique_ptr to an llvm::Expected type.
Modified:
clang-tools-extra/trunk/clang-doc/BitcodeReader.cpp
Modified: clang-tools-extra/trunk/clang-doc/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-doc/BitcodeReader.cpp?rev=339785&r1=339784&r2=339785&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-doc/BitcodeReader.cpp (original)
+++ clang-tools-extra/trunk/clang-doc/BitcodeReader.cpp Wed Aug 15 09:18:46 2018
@@ -657,7 +657,7 @@ ClangDocBitcodeReader::createInfo(unsign
std::unique_ptr<Info> I = llvm::make_unique<T>();
if (auto Err = readBlock(ID, static_cast<T *>(I.get())))
return std::move(Err);
- return I;
+ return std::unique_ptr<Info>{std::move(I)};;
}
llvm::Expected<std::unique_ptr<Info>>
More information about the cfe-commits
mailing list