[llvm] 18b8e3b - [ADT] Add a missing std::move to StringSwitch::EndsWithLower (#167151)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 8 10:16:12 PST 2025
Author: Kazu Hirata
Date: 2025-11-08T10:16:08-08:00
New Revision: 18b8e3bfb108fa605075fb22a9b2dfa09e278b3b
URL: https://github.com/llvm/llvm-project/commit/18b8e3bfb108fa605075fb22a9b2dfa09e278b3b
DIFF: https://github.com/llvm/llvm-project/commit/18b8e3bfb108fa605075fb22a9b2dfa09e278b3b.diff
LOG: [ADT] Add a missing std::move to StringSwitch::EndsWithLower (#167151)
All others seem to use std::move in StringSwitch.
Added:
Modified:
llvm/include/llvm/ADT/StringSwitch.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/StringSwitch.h b/llvm/include/llvm/ADT/StringSwitch.h
index 53ebec1eb3a54..5da6076c27390 100644
--- a/llvm/include/llvm/ADT/StringSwitch.h
+++ b/llvm/include/llvm/ADT/StringSwitch.h
@@ -158,7 +158,7 @@ class StringSwitch {
StringSwitch &EndsWithLower(StringLiteral S, T Value) {
if (!Result && Str.ends_with_insensitive(S))
- Result = Value;
+ Result = std::move(Value);
return *this;
}
More information about the llvm-commits
mailing list