[clang-tools-extra] [clang-include-cleaner] Fix -Wpessimizing-move warning introduced in 4cda28c1ada702a08f6960eb4c93919187c1d4d1 (PR #112684)
Mikael Holmén via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 17 04:01:03 PDT 2024
mikaelholmen wrote:
Already fixed in 2954d1f7bc8f
```
[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.
```
https://github.com/llvm/llvm-project/pull/112684
More information about the cfe-commits
mailing list