[llvm] b29bdab - CommandLine.h - use auto const reference in ValuesClass::apply for range loop. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 06:21:32 PDT 2020
Author: Simon Pilgrim
Date: 2020-09-09T14:21:14+01:00
New Revision: b29bdab8c76dbeda7786ef8e0d1bf58376955795
URL: https://github.com/llvm/llvm-project/commit/b29bdab8c76dbeda7786ef8e0d1bf58376955795
DIFF: https://github.com/llvm/llvm-project/commit/b29bdab8c76dbeda7786ef8e0d1bf58376955795.diff
LOG: CommandLine.h - use auto const reference in ValuesClass::apply for range loop. NFCI.
Added:
Modified:
llvm/include/llvm/Support/CommandLine.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h
index 38c588080069..a367387510e9 100644
--- a/llvm/include/llvm/Support/CommandLine.h
+++ b/llvm/include/llvm/Support/CommandLine.h
@@ -672,7 +672,7 @@ class ValuesClass {
: Values(Options) {}
template <class Opt> void apply(Opt &O) const {
- for (auto Value : Values)
+ for (const auto &Value : Values)
O.getParser().addLiteralOption(Value.Name, Value.Value,
Value.Description);
}
More information about the llvm-commits
mailing list