forked from OSchip/llvm-project
Fix two clang-tidy misc-move-forwarding-reference warnings
Patch by Michael Sharpe. llvm-svn: 288813
This commit is contained in:
parent
4fd1e7c628
commit
f92d44c673
|
@ -1057,7 +1057,7 @@ QualType simpleTransform(ASTContext &ctx, QualType type, F &&f) {
|
|||
SplitQualType splitType = type.split();
|
||||
|
||||
// Visit the type itself.
|
||||
SimpleTransformVisitor<F> visitor(ctx, std::move(f));
|
||||
SimpleTransformVisitor<F> visitor(ctx, std::forward<F>(f));
|
||||
QualType result = visitor.Visit(splitType.Ty);
|
||||
if (result.isNull())
|
||||
return result;
|
||||
|
|
|
@ -1941,7 +1941,7 @@ static T *buildByrefHelpers(CodeGenModule &CGM, const BlockByrefInfo &byrefInfo,
|
|||
generator.CopyHelper = buildByrefCopyHelper(CGM, byrefInfo, generator);
|
||||
generator.DisposeHelper = buildByrefDisposeHelper(CGM, byrefInfo, generator);
|
||||
|
||||
T *copy = new (CGM.getContext()) T(std::move(generator));
|
||||
T *copy = new (CGM.getContext()) T(std::forward<T>(generator));
|
||||
CGM.ByrefHelpersCache.InsertNode(copy, insertPos);
|
||||
return copy;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue