[Lldb-commits] [lldb] [lldb] Reformat OptionGroupVariable.{h, cpp}, NFC. (PR #192395)
Aman LaChapelle via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 15 22:52:21 PDT 2026
https://github.com/bzcheeseman created https://github.com/llvm/llvm-project/pull/192395
[lldb] Reformat OptionGroupVariable.{h,cpp}, NFC.
This patch runs clang-format on OptionGroupVariable.{h,cpp}.
>From 0ae4bdc75a0c2180d900948717f59255e11588c6 Mon Sep 17 00:00:00 2001
From: bzcheeseman <aman.lachapelle at gmail.com>
Date: Wed, 15 Apr 2026 22:49:41 -0700
Subject: [PATCH] [lldb] Reformat OptionGroupVariable.{h,cpp}, NFC.
This patch runs clang-format on OptionGroupVariable.{h,cpp}.
---
.../lldb/Interpreter/OptionGroupVariable.h | 6 +-
.../Interpreter/OptionGroupVariable.cpp | 105 ++++++++++++++----
2 files changed, 87 insertions(+), 24 deletions(-)
diff --git a/lldb/include/lldb/Interpreter/OptionGroupVariable.h b/lldb/include/lldb/Interpreter/OptionGroupVariable.h
index c9f1283d4de20..c1fbeb8e78b26 100644
--- a/lldb/include/lldb/Interpreter/OptionGroupVariable.h
+++ b/lldb/include/lldb/Interpreter/OptionGroupVariable.h
@@ -30,9 +30,9 @@ class OptionGroupVariable : public OptionGroup {
void OptionParsingStarting(ExecutionContext *execution_context) override;
bool include_frame_options : 1,
- show_args : 1, // Frame option only (include_frame_options == true)
- show_recognized_args : 1, // Frame option only (include_frame_options ==
- // true)
+ show_args : 1, // Frame option only (include_frame_options == true)
+ show_recognized_args : 1, // Frame option only (include_frame_options ==
+ // true)
show_locals : 1, // Frame option only (include_frame_options == true)
show_globals : 1, // Frame option only (include_frame_options == true)
use_regex : 1, show_scope : 1, show_decl : 1;
diff --git a/lldb/source/Interpreter/OptionGroupVariable.cpp b/lldb/source/Interpreter/OptionGroupVariable.cpp
index 9bffe1dba85e7..065b70a460c2f 100644
--- a/lldb/source/Interpreter/OptionGroupVariable.cpp
+++ b/lldb/source/Interpreter/OptionGroupVariable.cpp
@@ -20,33 +20,96 @@ using namespace lldb_private;
// if you add any options here, remember to update the counters in
// OptionGroupVariable::GetNumDefinitions()
static constexpr OptionDefinition g_variable_options[] = {
- {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "no-args", 'a',
- OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone,
+ {LLDB_OPT_SET_1 | LLDB_OPT_SET_2,
+ false,
+ "no-args",
+ 'a',
+ OptionParser::eNoArgument,
+ nullptr,
+ {},
+ 0,
+ eArgTypeNone,
"Omit function arguments."},
- {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "no-recognized-args", 't',
- OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone,
+ {LLDB_OPT_SET_1 | LLDB_OPT_SET_2,
+ false,
+ "no-recognized-args",
+ 't',
+ OptionParser::eNoArgument,
+ nullptr,
+ {},
+ 0,
+ eArgTypeNone,
"Omit recognized function arguments."},
- {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "no-locals", 'l',
- OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone,
+ {LLDB_OPT_SET_1 | LLDB_OPT_SET_2,
+ false,
+ "no-locals",
+ 'l',
+ OptionParser::eNoArgument,
+ nullptr,
+ {},
+ 0,
+ eArgTypeNone,
"Omit local variables."},
- {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "show-globals", 'g',
- OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone,
+ {LLDB_OPT_SET_1 | LLDB_OPT_SET_2,
+ false,
+ "show-globals",
+ 'g',
+ OptionParser::eNoArgument,
+ nullptr,
+ {},
+ 0,
+ eArgTypeNone,
"Show the current frame source file global and static variables."},
- {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "show-declaration", 'c',
- OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone,
+ {LLDB_OPT_SET_1 | LLDB_OPT_SET_2,
+ false,
+ "show-declaration",
+ 'c',
+ OptionParser::eNoArgument,
+ nullptr,
+ {},
+ 0,
+ eArgTypeNone,
"Show variable declaration information (source file and line where the "
"variable was declared)."},
- {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "regex", 'r',
- OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeRegularExpression,
+ {LLDB_OPT_SET_1 | LLDB_OPT_SET_2,
+ false,
+ "regex",
+ 'r',
+ OptionParser::eNoArgument,
+ nullptr,
+ {},
+ 0,
+ eArgTypeRegularExpression,
"The <variable-name> argument for name lookups are regular expressions."},
- {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "scope", 's',
- OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone,
+ {LLDB_OPT_SET_1 | LLDB_OPT_SET_2,
+ false,
+ "scope",
+ 's',
+ OptionParser::eNoArgument,
+ nullptr,
+ {},
+ 0,
+ eArgTypeNone,
"Show variable scope (argument, local, global, static)."},
- {LLDB_OPT_SET_1, false, "summary", 'y', OptionParser::eRequiredArgument,
- nullptr, {}, 0, eArgTypeName,
+ {LLDB_OPT_SET_1,
+ false,
+ "summary",
+ 'y',
+ OptionParser::eRequiredArgument,
+ nullptr,
+ {},
+ 0,
+ eArgTypeName,
"Specify the summary that the variable output should use."},
- {LLDB_OPT_SET_2, false, "summary-string", 'z',
- OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeName,
+ {LLDB_OPT_SET_2,
+ false,
+ "summary-string",
+ 'z',
+ OptionParser::eRequiredArgument,
+ nullptr,
+ {},
+ 0,
+ eArgTypeName,
"Specify a summary string to use to format the variable output."},
};
@@ -125,10 +188,10 @@ OptionGroupVariable::SetOptionValue(uint32_t option_idx,
void OptionGroupVariable::OptionParsingStarting(
ExecutionContext *execution_context) {
- show_args = true; // Frame option only
+ show_args = true; // Frame option only
show_recognized_args = true; // Frame option only
- show_locals = true; // Frame option only
- show_globals = false; // Frame option only
+ show_locals = true; // Frame option only
+ show_globals = false; // Frame option only
show_decl = false;
use_regex = false;
show_scope = false;
More information about the lldb-commits
mailing list