diff options
author | Richard Trieu <rtrieu@google.com> | 2015-07-29 17:03:34 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2015-07-29 17:03:34 +0000 |
commit | 6093d143c5a76d168854321a1fc3d63e9c6d1ee6 (patch) | |
tree | 347116319443ee58291614b2506cc3db876ff83a /clang/lib/Sema/SemaInit.cpp | |
parent | cf739b8c3dac5bbee2a81b300d6cdf7b60af53dc (diff) | |
download | bcm5719-llvm-6093d143c5a76d168854321a1fc3d63e9c6d1ee6.tar.gz bcm5719-llvm-6093d143c5a76d168854321a1fc3d63e9c6d1ee6.zip |
Disable -Wpessimizing-move and -Wredundant-move in template instantiations.
Dependent types can throw off the analysis for these warnings, possibly giving
conflicting warnings and fix-its. Disabling the warning in template
instantiations will prevent this problem, and will still catch the
non-dependent cases in templates.
llvm-svn: 243538
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index fd067775aca..f66bc7f37ad 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -5926,6 +5926,9 @@ static void CheckMoveOnConstruction(Sema &S, const Expr *InitExpr, if (!InitExpr) return; + if (!S.ActiveTemplateInstantiations.empty()) + return; + QualType DestType = InitExpr->getType(); if (!DestType->isRecordType()) return; |