r288813 - Fix two clang-tidy misc-move-forwarding-reference warnings
Malcolm Parsons via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 6 06:49:19 PST 2016
Author: malcolm.parsons
Date: Tue Dec 6 08:49:18 2016
New Revision: 288813
URL: http://llvm.org/viewvc/llvm-project?rev=288813&view=rev
Log:
Fix two clang-tidy misc-move-forwarding-reference warnings
Patch by Michael Sharpe.
Modified:
cfe/trunk/lib/AST/Type.cpp
cfe/trunk/lib/CodeGen/CGBlocks.cpp
Modified: cfe/trunk/lib/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Type.cpp?rev=288813&r1=288812&r2=288813&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Type.cpp (original)
+++ cfe/trunk/lib/AST/Type.cpp Tue Dec 6 08:49:18 2016
@@ -1057,7 +1057,7 @@ QualType simpleTransform(ASTContext &ctx
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;
Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.cpp?rev=288813&r1=288812&r2=288813&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.cpp Tue Dec 6 08:49:18 2016
@@ -1941,7 +1941,7 @@ static T *buildByrefHelpers(CodeGenModul
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;
}
More information about the cfe-commits
mailing list