[Lldb-commits] [lldb] [lldb] Part 1 of 2 - Refactor `CommandObject::Execute(...)` return `void` (not `bool`) (PR #69989)

Pete Lawrence via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 24 14:59:50 PDT 2023


================
@@ -769,10 +768,10 @@ bool CommandObjectRaw::Execute(const char *args_string,
     handled = InvokeOverrideCallback(argv, result);
   }
   if (!handled) {
-    if (CheckRequirements(result))
-      handled = DoExecute(args_string, result);
+    if (CheckRequirements(result)) {
+      DoExecute(args_string, result);
+    }
----------------
PortalPete wrote:

I took out the braces.
Interesting the code_formatter test/bot didn't flag that or the other one-liners within curly braces.

I typically write my code for safety first and then readability/maintainability, and I put in the curly braces in for those reasons.

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


More information about the lldb-commits mailing list