[Lldb-commits] [lldb] [lldb] Deal with SupportFiles in SourceManager (NFC) (PR #106740)

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 30 10:39:26 PDT 2024


================
@@ -769,20 +769,26 @@ class CommandObjectBreakpointSet : public CommandObjectParsed {
 private:
   bool GetDefaultFile(Target &target, FileSpec &file,
                       CommandReturnObject &result) {
-    uint32_t default_line;
     // First use the Source Manager's default file. Then use the current stack
     // frame's file.
-    if (!target.GetSourceManager().GetDefaultFileAndLine(file, default_line)) {
+    auto file_and_line = target.GetSourceManager().GetDefaultFileAndLine();
----------------
bulbazord wrote:

Suggestion: It's not obvious this is an optional type. Maybe name it `maybe_file_and_line`? 😄 

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


More information about the lldb-commits mailing list