[Lldb-commits] [lldb] [lldb] Reformat OptionGroupVariable.{h, cpp}, NFC. (PR #192395)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 15 22:52:51 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Aman LaChapelle (bzcheeseman)
<details>
<summary>Changes</summary>
Stacked PRs:
* #<!-- -->181501
* #<!-- -->181500
* __->__#<!-- -->192395
--- --- ---
### [lldb] Reformat OptionGroupVariable.{h,cpp}, NFC.
This patch runs clang-format on OptionGroupVariable.{h,cpp}.
---
Full diff: https://github.com/llvm/llvm-project/pull/192395.diff
2 Files Affected:
- (modified) lldb/include/lldb/Interpreter/OptionGroupVariable.h (+3-3)
- (modified) lldb/source/Interpreter/OptionGroupVariable.cpp (+84-21)
``````````diff
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;
``````````
</details>
https://github.com/llvm/llvm-project/pull/192395
More information about the lldb-commits
mailing list