Skip to content

Commit ac1d43b

Browse files
committed
ClangImporter: repair build on Windows
Explicitly apply the std::move as the signature of the callee is: void swift::Evaluator::cacheOutput<swift::ExtendedNominalRequest, _>(const Request &, swift::NominalTypeDecl *&&) The second formal parameter here is a `swift::ClassDecl` which is a subclass of NominalTypeDecl, however, the cast will construct a `swift::NominalTypeDecl *`. This is a lvalue and cannot be bound to a r-value reference. Explicitly construct the r-value reference via `std::move`.
1 parent b0c93bb commit ac1d43b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4550,7 +4550,7 @@ namespace {
45504550
Impl.SwiftContext.evaluator.cacheOutput(ExtendedTypeRequest{result},
45514551
objcClass->getDeclaredType());
45524552
Impl.SwiftContext.evaluator.cacheOutput(ExtendedNominalRequest{result},
4553-
objcClass);
4553+
std::move(objcClass));
45544554

45554555
// Determine the type and generic args of the extension.
45564556
if (objcClass->getGenericParams()) {

0 commit comments

Comments
 (0)