diff options
| author | Malcolm Parsons <malcolm.parsons@gmail.com> | 2016-12-06 14:49:18 +0000 |
|---|---|---|
| committer | Malcolm Parsons <malcolm.parsons@gmail.com> | 2016-12-06 14:49:18 +0000 |
| commit | f92d44c673f62676476a4cc035a28a894ac07180 (patch) | |
| tree | 393dbfc0b64339da65317932353f2cb45367713f | |
| parent | 4fd1e7c628b6048b8c0f455bbe06b8c8c614335e (diff) | |
| download | bcm5719-llvm-f92d44c673f62676476a4cc035a28a894ac07180.tar.gz bcm5719-llvm-f92d44c673f62676476a4cc035a28a894ac07180.zip | |
Fix two clang-tidy misc-move-forwarding-reference warnings
Patch by Michael Sharpe.
llvm-svn: 288813
| -rw-r--r-- | clang/lib/AST/Type.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CGBlocks.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp index d98d8d72aeb..0d0cd2e305b 100644 --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -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; diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 09911d4b099..50a6d61e7e5 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -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; } |

