[Lldb-commits] [PATCH] D101556: [lldb] Move and clean-up the Declaration class (NFC)

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 29 12:36:16 PDT 2021


JDevlieghere added inline comments.


================
Comment at: lldb/include/lldb/Core/Declaration.h:129
+
+  bool IsValid() const {
+    return m_file && (m_line != 0 || m_line != LLDB_INVALID_LINE_NUMBER);
----------------
Let's also add an operator bool that just calls `IsValid()` under the hood. 


================
Comment at: lldb/include/lldb/Core/Declaration.h:130
+  bool IsValid() const {
+    return m_file && (m_line != 0 || m_line != LLDB_INVALID_LINE_NUMBER);
+  }
----------------



================
Comment at: lldb/include/lldb/Core/Declaration.h:165-169
   FileSpec m_file; ///< The file specification that points to the
                    ///< source file where the declaration occurred.
   uint32_t m_line; ///< Non-zero values indicates a valid line number,
                    ///< zero indicates no line number information is available.
+  uint16_t m_column; ///< Non-zero values indicates a valid column number,
----------------
Move this above the variables. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101556/new/

https://reviews.llvm.org/D101556



More information about the lldb-commits mailing list