[all-commits] [llvm/llvm-project] 2954d1: [include-cleaner] Fix -Wpessimizing-move in Includ...

Jie Fu (傅杰) via All-commits all-commits at lists.llvm.org
Thu Oct 17 03:52:51 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2954d1f7bc8fa77c51768855d9df98f5559a5c5e
      https://github.com/llvm/llvm-project/commit/2954d1f7bc8fa77c51768855d9df98f5559a5c5e
  Author: Jie Fu <jiefu at tencent.com>
  Date:   2024-10-17 (Thu, 17 Oct 2024)

  Changed paths:
    M clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp

  Log Message:
  -----------
  [include-cleaner] Fix -Wpessimizing-move in IncludeCleaner.cpp (NFC)

/llvm-project/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp:302:14:
error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
      return std::move(llvm::errorCodeToError(Err));
             ^
/llvm-project/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp:302:14: note: remove std::move call here
      return std::move(llvm::errorCodeToError(Err));
             ^~~~~~~~~~                           ~
1 error generated.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list