[PATCH] D98942: [cmake] Disable GCC 9's -Wpessimizing-move
Pavel Labath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 22 02:36:40 PDT 2021
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.
looks good to me.
================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:683-687
# Disable -Wredundant-move on GCC>=9. GCC wants to remove std::move in code
# like "A foo(ConvertibleToA a) { return std::move(a); }", but this code does
# not compile (or uses the copy constructor instead) on clang<=3.8. Clang also
# has a -Wredundant-move, but it only fires when the types match exactly, so
# we can keep it here.
----------------
This comment could use some rephrasing/generalization.
================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:700
# Check if -Wnon-virtual-dtor warns even though the class is marked final.
# If it does, don't add it. So it won't be added on clang 3.4 and older.
# This also catches cases when -Wnon-virtual-dtor isn't supported by
----------------
xbolva00 wrote:
> Maybe we can drop this? LLVM supports clang 3.6 or newer.
Possibly. But that definitely sounds like a separate patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98942/new/
https://reviews.llvm.org/D98942
More information about the llvm-commits
mailing list