[Lldb-commits] [lldb] r283176 - Fix TestNestedAliases.py

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 3 18:34:39 PDT 2016


Author: zturner
Date: Mon Oct  3 20:34:39 2016
New Revision: 283176

URL: http://llvm.org/viewvc/llvm-project?rev=283176&view=rev
Log:
Fix TestNestedAliases.py

I missed an if/else branch when doing the conversion.

Modified:
    lldb/trunk/source/Interpreter/CommandInterpreter.cpp

Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=283176&r1=283175&r2=283176&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Oct  3 20:34:39 2016
@@ -1373,12 +1373,13 @@ CommandObject *CommandInterpreter::Build
                                    index);
       result.SetStatus(eReturnStatusFailed);
       return nullptr;
+    } else {
+      size_t strpos = raw_input_string.find(cmd_args.GetArgumentAtIndex(index));
+      if (strpos != std::string::npos)
+        raw_input_string = raw_input_string.erase(
+            strpos, strlen(cmd_args.GetArgumentAtIndex(index)));
+      result_str.Printf("%s", cmd_args.GetArgumentAtIndex(index));
     }
-    size_t strpos = raw_input_string.find(cmd_args.GetArgumentAtIndex(index));
-    if (strpos != std::string::npos)
-      raw_input_string = raw_input_string.erase(
-          strpos, strlen(cmd_args.GetArgumentAtIndex(index)));
-    result_str.Printf("%s", cmd_args.GetArgumentAtIndex(index));
   }
 
   alias_result = result_str.GetData();




More information about the lldb-commits mailing list