Re-add "demonstrate new Args API"
This fixes the build breakage due to the use of C++14.
llvm-svn: 287647
diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp
index 0a97804..23fdcb9 100644
--- a/lldb/source/Commands/CommandObjectSettings.cpp
+++ b/lldb/source/Commands/CommandObjectSettings.cpp
@@ -293,15 +293,10 @@
bool DoExecute(Args &args, CommandReturnObject &result) override {
result.SetStatus(eReturnStatusSuccessFinishResult);
- const size_t argc = args.GetArgumentCount();
if (!args.empty()) {
- // TODO: Convert this to StringRef based enumeration. Requires converting
- // DumpPropertyValue first.
- for (size_t i = 0; i < argc; ++i) {
- const char *property_path = args.GetArgumentAtIndex(i);
-
+ for (const auto &arg : args) {
Error error(m_interpreter.GetDebugger().DumpPropertyValue(
- &m_exe_ctx, result.GetOutputStream(), property_path,
+ &m_exe_ctx, result.GetOutputStream(), arg.ref,
OptionValue::eDumpGroupValue));
if (error.Success()) {
result.GetOutputStream().EOL();