Fix two clang-tidy misc-move-forwarding-reference warnings

Patch by Michael Sharpe.

llvm-svn: 288813
This commit is contained in:
Malcolm Parsons 2016-12-06 14:49:18 +00:00
parent 4fd1e7c628
commit f92d44c673
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;
}