Skip to content

[NFC][lldb-dap] Add missing header guard for DAPError and ProgressEvent. #145915

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 2 commits into from
Jun 26, 2025

Conversation

da-viper
Copy link
Contributor

delete the copy, move constructor and assignment for ProgressEventReporter.

delete the copy, move construction and assignment.
@da-viper da-viper requested a review from ashgti June 26, 2025 15:11
@da-viper da-viper requested a review from JDevlieghere as a code owner June 26, 2025 15:11
@llvmbot llvmbot added the lldb label Jun 26, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 26, 2025

@llvm/pr-subscribers-lldb

Author: Ebuka Ezike (da-viper)

Changes

delete the copy, move constructor and assignment for ProgressEventReporter.


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

2 Files Affected:

  • (modified) lldb/tools/lldb-dap/DAPError.h (+5)
  • (modified) lldb/tools/lldb-dap/ProgressEvent.h (+10-3)
diff --git a/lldb/tools/lldb-dap/DAPError.h b/lldb/tools/lldb-dap/DAPError.h
index e18614fe71935..e3ad10806a343 100644
--- a/lldb/tools/lldb-dap/DAPError.h
+++ b/lldb/tools/lldb-dap/DAPError.h
@@ -6,6 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef LLDB_TOOLS_LLDB_DAP_DAPERROR_H
+#define LLDB_TOOLS_LLDB_DAP_DAPERROR_H
+
 #include "llvm/Support/Error.h"
 #include <optional>
 #include <string>
@@ -50,3 +53,5 @@ class NotStoppedError : public llvm::ErrorInfo<NotStoppedError> {
 };
 
 } // namespace lldb_dap
+
+#endif // LLDB_TOOLS_LLDB_DAP_DAPERROR_H
\ No newline at end of file
diff --git a/lldb/tools/lldb-dap/ProgressEvent.h b/lldb/tools/lldb-dap/ProgressEvent.h
index d1b9b9dd887cd..55c7bd73f324e 100644
--- a/lldb/tools/lldb-dap/ProgressEvent.h
+++ b/lldb/tools/lldb-dap/ProgressEvent.h
@@ -6,6 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef LLDB_TOOLS_LLDB_DAP_PROGRESS_EVENT_H
+#define LLDB_TOOLS_LLDB_DAP_PROGRESS_EVENT_H
+
 #include <atomic>
 #include <chrono>
 #include <mutex>
@@ -13,8 +16,6 @@
 #include <queue>
 #include <thread>
 
-#include "DAPForward.h"
-
 #include "llvm/Support/JSON.h"
 
 namespace lldb_dap {
@@ -129,8 +130,12 @@ class ProgressEventReporter {
 public:
   /// \param[in] report_callback
   ///     Function to invoke to report the event to the IDE.
-  ProgressEventReporter(ProgressEventReportCallback report_callback);
+  explicit ProgressEventReporter(ProgressEventReportCallback report_callback);
 
+  ProgressEventReporter(const ProgressEventReporter &) = delete;
+  ProgressEventReporter(ProgressEventReporter &&) = delete;
+  ProgressEventReporter &operator=(const ProgressEventReporter &) = delete;
+  ProgressEventReporter &operator=(ProgressEventReporter &&) = delete;
   ~ProgressEventReporter();
 
   /// Add a new event to the internal queue and report the event if
@@ -156,3 +161,5 @@ class ProgressEventReporter {
 };
 
 } // namespace lldb_dap
+
+#endif // LLDB_TOOLS_LLDB_DAP_PROGRESS_EVENT_H
\ No newline at end of file

@@ -156,3 +161,5 @@ class ProgressEventReporter {
};

} // namespace lldb_dap

#endif // LLDB_TOOLS_LLDB_DAP_PROGRESS_EVENT_H
Copy link
Member

Choose a reason for hiding this comment

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

Missing newline

@da-viper da-viper merged commit d83457e into llvm:main Jun 26, 2025
7 checks passed
@da-viper da-viper deleted the missing-header-guard branch June 26, 2025 16:42
anthonyhatran pushed a commit to anthonyhatran/llvm-project that referenced this pull request Jun 26, 2025
…nt. (llvm#145915)

Delete the copy, move constructor and assignment for ProgressEventReporter.
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