[Lldb-commits] [lldb] [lldb] Limit DIL globals to only current file (PR #192592)

via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 16 21:49:50 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- lldb/include/lldb/ValueObject/DILEval.h lldb/source/ValueObject/DILEval.cpp lldb/source/ValueObject/DILParser.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lldb/source/ValueObject/DILEval.cpp b/lldb/source/ValueObject/DILEval.cpp
index 228524b00..0abe403f6 100644
--- a/lldb/source/ValueObject/DILEval.cpp
+++ b/lldb/source/ValueObject/DILEval.cpp
@@ -290,9 +290,10 @@ static lldb::VariableSP DILFindVariable(ConstString name,
   return nullptr;
 }
 
-lldb::ValueObjectSP LookupGlobalIdentifier(
-    llvm::StringRef name_ref, std::shared_ptr<StackFrame> stack_frame,
-    lldb::DynamicValueType use_dynamic) {
+lldb::ValueObjectSP
+LookupGlobalIdentifier(llvm::StringRef name_ref,
+                       std::shared_ptr<StackFrame> stack_frame,
+                       lldb::DynamicValueType use_dynamic) {
   // Get a global variables list without the locals from the current frame
   SymbolContext symbol_context =
       stack_frame->GetSymbolContext(lldb::eSymbolContextCompUnit);
@@ -418,8 +419,8 @@ Interpreter::Visit(const IdentifierNode &node) {
       LookupIdentifier(node.GetName(), m_exe_ctx_scope, use_dynamic);
 
   if (!identifier)
-    identifier = LookupGlobalIdentifier(node.GetName(), m_exe_ctx_scope,
-                                        use_dynamic);
+    identifier =
+        LookupGlobalIdentifier(node.GetName(), m_exe_ctx_scope, use_dynamic);
   if (!identifier) {
     std::string errMsg =
         llvm::formatv("use of undeclared identifier '{0}'", node.GetName());

``````````

</details>


https://github.com/llvm/llvm-project/pull/192592


More information about the lldb-commits mailing list