[Lldb-commits] [lldb] [lldb] Fix incorrect logical operator in 'if' condition check (NFC) (PR #94779)

Shivam Gupta via lldb-commits lldb-commits at lists.llvm.org
Sat Jul 6 00:22:23 PDT 2024


================
@@ -85,13 +85,17 @@ class ScriptedPythonInterface : virtual public ScriptedInterface {
     bool has_class_name = !class_name.empty();
     bool has_interpreter_dict =
         !(llvm::StringRef(m_interpreter.GetDictionaryName()).empty());
-    if (!has_class_name && !has_interpreter_dict && !script_obj) {
-      if (!has_class_name)
-        return create_error("Missing script class name.");
-      else if (!has_interpreter_dict)
-        return create_error("Invalid script interpreter dictionary.");
-      else
-        return create_error("Missing scripting object.");
+
+    if (!has_class_name) {
+      return create_error("Missing script class name.");
+    }
----------------
xgupta wrote:

Sure, thanks.

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


More information about the lldb-commits mailing list