[Lldb-commits] [lldb] bf6880c - [lldb] Don't emit .lldbinit warning as an error (#163265)

via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 13 15:43:56 PDT 2025


Author: Jonas Devlieghere
Date: 2025-10-13T15:43:52-07:00
New Revision: bf6880c9970c760f3459a0ec25fac142211e6f78

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

LOG: [lldb] Don't emit .lldbinit warning as an error (#163265)

Actually emit a warning, rather than an error, when there's an .lldbinit
file in the current directly. Currently, the message is prepended by
"error" which looks rather odd, as the warning refers to itself as a
warning.

Added: 
    

Modified: 
    lldb/source/Interpreter/CommandInterpreter.cpp
    lldb/test/Shell/Driver/LocalLLDBInit.test

Removed: 
    


################################################################################
diff  --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index d909c5650c95b..ffcc9ceeb2a93 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -2591,7 +2591,7 @@ void CommandInterpreter::SourceInitFileCwd(CommandReturnObject &result) {
         llvm::sys::path::parent_path(home_init_file.GetPath())) {
       result.SetStatus(eReturnStatusSuccessFinishNoResult);
     } else {
-      result.AppendError(InitFileWarning);
+      result.AppendWarning(InitFileWarning);
     }
   }
   }

diff  --git a/lldb/test/Shell/Driver/LocalLLDBInit.test b/lldb/test/Shell/Driver/LocalLLDBInit.test
index 5db545e7ec561..2aa8c527929f9 100644
--- a/lldb/test/Shell/Driver/LocalLLDBInit.test
+++ b/lldb/test/Shell/Driver/LocalLLDBInit.test
@@ -9,7 +9,7 @@
 # RUN: env HOME=%t.home %lldb-init -local-lldbinit -o 'settings show frame-format' 2>&1 | FileCheck %s --check-prefix=ALLOWINIT --check-prefix=NOINIT
 # RUN: %lldb -o 'settings show frame-format' 2>&1 | FileCheck %s --check-prefix=NOINIT --check-prefix=CHECK
 
-# WARNINIT: There is a .lldbinit file in the current directory which is not being read.
+# WARNINIT: warning: There is a .lldbinit file in the current directory which is not being read.
 # NOINIT-NOT: There is a .lldbinit file in the current directory which is not being read.
 # CHECK-NOT: bogus
 # ALLOWINIT: name 'prlnt' is not defined


        


More information about the lldb-commits mailing list