[Lldb-commits] [lldb] 3b142bc - [LLDB] Fix more -Wdocumentation issues (NFC)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 14 14:31:50 PST 2019


Author: Jonas Devlieghere
Date: 2019-11-14T14:31:44-08:00
New Revision: 3b142bc9ff14869726e4fff27ba6f925aa7b5be4

URL: https://github.com/llvm/llvm-project/commit/3b142bc9ff14869726e4fff27ba6f925aa7b5be4
DIFF: https://github.com/llvm/llvm-project/commit/3b142bc9ff14869726e4fff27ba6f925aa7b5be4.diff

LOG: [LLDB] Fix more -Wdocumentation issues (NFC)

Added: 
    

Modified: 
    lldb/include/lldb/Breakpoint/BreakpointOptions.h
    lldb/include/lldb/Core/Address.h
    lldb/include/lldb/Expression/ExpressionParser.h
    lldb/include/lldb/Expression/UtilityFunction.h
    lldb/include/lldb/Interpreter/CommandObject.h
    lldb/include/lldb/Target/Process.h
    lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Breakpoint/BreakpointOptions.h b/lldb/include/lldb/Breakpoint/BreakpointOptions.h
index 55a4be2d19c1..9e02afff5227 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointOptions.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointOptions.h
@@ -135,7 +135,7 @@ friend class Breakpoint;
 
   // Operators
   const BreakpointOptions &operator=(const BreakpointOptions &rhs);
-  
+
   /// Copy over only the options set in the incoming BreakpointOptions.
   void CopyOverSetOptions(const BreakpointOptions &rhs);
 
@@ -267,7 +267,7 @@ friend class Breakpoint;
   bool IsEnabled() const { return m_enabled; }
 
   /// If \a enable is \b true, enable the breakpoint, if \b false disable it.
-  void SetEnabled(bool enabled) { 
+  void SetEnabled(bool enabled) {
     m_enabled = enabled;
     m_set_flags.Set(eEnabled);
   }
@@ -278,7 +278,7 @@ friend class Breakpoint;
   bool IsAutoContinue() const { return m_auto_continue; }
 
   /// Set the auto-continue state.
-  void SetAutoContinue(bool auto_continue) { 
+  void SetAutoContinue(bool auto_continue) {
     m_auto_continue = auto_continue;
     m_set_flags.Set(eAutoContinue);
   }
@@ -289,17 +289,16 @@ friend class Breakpoint;
   bool IsOneShot() const { return m_one_shot; }
 
   /// If \a enable is \b true, enable the breakpoint, if \b false disable it.
-  void SetOneShot(bool one_shot) { 
-    m_one_shot = one_shot; 
-    m_set_flags.Set(eOneShot); 
+  void SetOneShot(bool one_shot) {
+    m_one_shot = one_shot;
+    m_set_flags.Set(eOneShot);
   }
 
   /// Set the breakpoint to ignore the next \a count breakpoint hits.
-  /// \param[in] count
+  /// \param[in] n
   ///    The number of breakpoint hits to ignore.
-
-  void SetIgnoreCount(uint32_t n) { 
-    m_ignore_count = n; 
+  void SetIgnoreCount(uint32_t n) {
+    m_ignore_count = n;
     m_set_flags.Set(eIgnoreCount);
   }
 
@@ -341,13 +340,13 @@ friend class Breakpoint;
   ///     A UP holding the new'ed CommandData object.
   ///     The breakpoint will take ownership of pointer held by this object.
   void SetCommandDataCallback(std::unique_ptr<CommandData> &cmd_data);
-  
+
   void Clear();
-  
+
   bool AnySet() const {
     return m_set_flags.AnySet(eAllOptions);
   }
-  
+
 protected:
   // Classes that inherit from BreakpointOptions can see and modify these
   bool IsOptionSet(OptionKind kind)
@@ -377,7 +376,7 @@ friend class Breakpoint;
 
 private:
   /// For BreakpointOptions only
-  
+
   /// This is the callback function pointer
   BreakpointHitCallback m_callback;
   /// This is the client data for the callback

diff  --git a/lldb/include/lldb/Core/Address.h b/lldb/include/lldb/Core/Address.h
index 386c3f1a0f85..70a7f790e40d 100644
--- a/lldb/include/lldb/Core/Address.h
+++ b/lldb/include/lldb/Core/Address.h
@@ -131,7 +131,7 @@ class Address {
   ///
   /// Initialize the address with the supplied \a section and \a offset.
   ///
-  /// \param[in] section
+  /// \param[in] section_sp
   ///     A section pointer to a valid lldb::Section, or NULL if the
   ///     address doesn't have a section or will get resolved later.
   ///
@@ -443,7 +443,7 @@ class Address {
 
   /// Set accessor for the section.
   ///
-  /// \param[in] section
+  /// \param[in] section_sp
   ///     A new lldb::Section pointer to use as the section base. Can
   ///     be NULL for absolute addresses that are not relative to
   ///     any section.

diff  --git a/lldb/include/lldb/Expression/ExpressionParser.h b/lldb/include/lldb/Expression/ExpressionParser.h
index 4dec5d6a9aae..2e7b3075d509 100644
--- a/lldb/include/lldb/Expression/ExpressionParser.h
+++ b/lldb/include/lldb/Expression/ExpressionParser.h
@@ -29,7 +29,7 @@ class ExpressionParser {
   ///
   /// Initializes class variables.
   ///
-  /// \param[in] exe_scope,
+  /// \param[in] exe_scope
   ///     If non-NULL, an execution context scope that can help to
   ///     correctly create an expression with a valid process for
   ///     optional tuning Objective-C runtime support. Can be NULL.

diff  --git a/lldb/include/lldb/Expression/UtilityFunction.h b/lldb/include/lldb/Expression/UtilityFunction.h
index 8a11e2fba05b..c3d185899b0f 100644
--- a/lldb/include/lldb/Expression/UtilityFunction.h
+++ b/lldb/include/lldb/Expression/UtilityFunction.h
@@ -60,16 +60,16 @@ class UtilityFunction : public Expression {
   virtual bool Install(DiagnosticManager &diagnostic_manager,
                        ExecutionContext &exe_ctx) = 0;
 
-  /// Check whether the given PC is inside the function
+  /// Check whether the given address is inside the function
   ///
   /// Especially useful if the function dereferences nullptr to indicate a
   /// failed assert.
   ///
-  /// \param[in] pc
-  ///     The program counter to check.
+  /// \param[in] address
+  ///     The address to check.
   ///
   /// \return
-  ///     True if the program counter falls within the function's bounds;
+  ///     True if the address falls within the function's bounds;
   ///     false if not (or the function is not JIT compiled)
   bool ContainsAddress(lldb::addr_t address) {
     // nothing is both >= LLDB_INVALID_ADDRESS and < LLDB_INVALID_ADDRESS, so

diff  --git a/lldb/include/lldb/Interpreter/CommandObject.h b/lldb/include/lldb/Interpreter/CommandObject.h
index 1c6eb286348d..f4dc2d606dda 100644
--- a/lldb/include/lldb/Interpreter/CommandObject.h
+++ b/lldb/include/lldb/Interpreter/CommandObject.h
@@ -261,8 +261,8 @@ class CommandObject {
 
   /// Get the command that appropriate for a "repeat" of the current command.
   ///
-  /// \param[in] current_command_line
-  ///    The complete current command line.
+  /// \param[in] current_command_args
+  ///    The command arguments.
   ///
   /// \return
   ///     nullptr if there is no special repeat command - it will use the

diff  --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h
index b06dcbd74f11..81181a831a49 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -1384,7 +1384,8 @@ class Process : public std::enable_shared_from_this<Process>,
   /// the core file.
   ///
   /// \return
-  //      true if the user should be warned about detaching from this process.
+  ///     Returns \b true if the user should be warned about detaching from
+  ///     this process.
   virtual bool WarnBeforeDetach() const { return true; }
 
   /// Actually do the reading of memory from a process.

diff  --git a/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp b/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp
index dfe61316b042..b73b6c095368 100644
--- a/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp
+++ b/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp
@@ -153,7 +153,7 @@ bool MainThreadCheckerRuntime::NotifyBreakpointHit(
     user_id_t break_loc_id) {
   assert(baton && "null baton");
   if (!baton)
-    return false; //< false => resume execution.
+    return false; ///< false => resume execution.
 
   MainThreadCheckerRuntime *const instance =
       static_cast<MainThreadCheckerRuntime *>(baton);
@@ -241,30 +241,30 @@ MainThreadCheckerRuntime::GetBacktracesFromExtendedStopInfo(
     StructuredData::ObjectSP info) {
   ThreadCollectionSP threads;
   threads = std::make_shared<ThreadCollection>();
-  
+
   ProcessSP process_sp = GetProcessSP();
-  
+
   if (info->GetObjectForDotSeparatedPath("instrumentation_class")
       ->GetStringValue() != "MainThreadChecker")
     return threads;
-  
+
   std::vector<lldb::addr_t> PCs;
   auto trace = info->GetObjectForDotSeparatedPath("trace")->GetAsArray();
   trace->ForEach([&PCs](StructuredData::Object *PC) -> bool {
     PCs.push_back(PC->GetAsInteger()->GetValue());
     return true;
   });
-  
+
   if (PCs.empty())
     return threads;
-  
+
   StructuredData::ObjectSP thread_id_obj =
       info->GetObjectForDotSeparatedPath("tid");
   tid_t tid = thread_id_obj ? thread_id_obj->GetIntegerValue() : 0;
 
   HistoryThread *history_thread = new HistoryThread(*process_sp, tid, PCs);
   ThreadSP new_thread_sp(history_thread);
-  
+
   // Save this in the Process' ExtendedThreadList so a strong pointer retains
   // the object
   process_sp->GetExtendedThreadList().AddThread(new_thread_sp);


        


More information about the lldb-commits mailing list