Skip to content

[lldb-dap] Correct the variable name from a half finished merge. #130186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

ashgti
Copy link
Contributor

@ashgti ashgti commented Mar 6, 2025

No description provided.

@ashgti ashgti marked this pull request as ready for review March 6, 2025 22:07
@ashgti ashgti requested a review from JDevlieghere as a code owner March 6, 2025 22:07
@llvmbot
Copy link
Member

llvmbot commented Mar 6, 2025

@llvm/pr-subscribers-lldb

Author: John Harrison (ashgti)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/130186.diff

1 Files Affected:

  • (modified) lldb/tools/lldb-dap/OutputRedirector.cpp (+3-3)
diff --git a/lldb/tools/lldb-dap/OutputRedirector.cpp b/lldb/tools/lldb-dap/OutputRedirector.cpp
index 44044a6849e0f..9ff25ad4149dd 100644
--- a/lldb/tools/lldb-dap/OutputRedirector.cpp
+++ b/lldb/tools/lldb-dap/OutputRedirector.cpp
@@ -38,7 +38,7 @@ Expected<int> OutputRedirector::GetWriteFileDescriptor() {
   return m_fd;
 }
 
-Error OutputRedirector::RedirectTo(std::FILE *file_override,
+Error OutputRedirector::RedirectTo(std::FILE *fileOverride,
                                    std::function<void(StringRef)> callback) {
   assert(m_fd == kInvalidDescriptor && "Output readirector already started.");
   int new_fd[2];
@@ -56,8 +56,8 @@ Error OutputRedirector::RedirectTo(std::FILE *file_override,
   int read_fd = new_fd[0];
   m_fd = new_fd[1];
 
-  if (override) {
-    int override_fd = fileno(override);
+  if (fileOverride) {
+    int override_fd = fileno(fileOverride);
 
     // Backup the FD to restore once redirection is complete.
     m_original_fd = override_fd;

@ashgti
Copy link
Contributor Author

ashgti commented Mar 6, 2025

I didn't realize the suggestion only updated the variable name in the parameter, sorry!

@ashgti ashgti merged commit e415721 into llvm:main Mar 6, 2025
12 of 14 checks passed
@@ -38,7 +38,7 @@ Expected<int> OutputRedirector::GetWriteFileDescriptor() {
return m_fd;
}

Error OutputRedirector::RedirectTo(std::FILE *file_override,
Error OutputRedirector::RedirectTo(std::FILE *fileOverride,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But now this doesn't conform to lldb's coding style :( Why not change line 59-60 to file_override?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the churn, I saw I broke the CI job so I was trying to fix it to unblock that.

Created #130202 to conform to lldb's coding style.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah no worries. Thanks for the quick turnaround!

jph-13 pushed a commit to jph-13/llvm-project that referenced this pull request Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants