github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. 
:warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- 
lldb/include/lldb/Utility/CarolinesTimers.h 
lldb/source/Utility/CarolinesTimers.cpp lldb/source/API/SBFrame.cpp 
lldb/source/Commands/CommandObjectFrame.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lldb/include/lldb/Utility/CarolinesTimers.h 
b/lldb/include/lldb/Utility/CarolinesTimers.h
index c5c630b17..c215a03cf 100644
--- a/lldb/include/lldb/Utility/CarolinesTimers.h
+++ b/lldb/include/lldb/Utility/CarolinesTimers.h
@@ -18,19 +18,17 @@ enum CarolineTimerEvent {
   eCarolineEndFrameVar = 1,
   eCarolineStartExprEval = 2,
   eCarolineEndExprEval = 3,
-  //eCarolineStartNameIndexes = 4,
-  //eCarolineEndNameIndexes = 5,
-  //eCarolineStartDwarfIndex = 6,
-  //eCarolineEndDwarfIndex = 7,
-  //eCarolineEndHandleCommand = 8,
+  // eCarolineStartNameIndexes = 4,
+  // eCarolineEndNameIndexes = 5,
+  // eCarolineStartDwarfIndex = 6,
+  // eCarolineEndDwarfIndex = 7,
+  // eCarolineEndHandleCommand = 8,
   eCarolineLastItem = 4
 };
 
-void CarolineTimeStamp(CarolineTimerEvent event_kind,
-                       const std::string &expr,
+void CarolineTimeStamp(CarolineTimerEvent event_kind, const std::string &expr,
                        timespec *time_ptr = nullptr);
 
-
 } // namespace lldb_private
 
 #endif // LLDB_CAROLINES_TIMERS_H
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp 
b/lldb/source/Commands/CommandObjectFrame.cpp
index 97b92d694..80f2cc0d3 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -752,7 +752,8 @@ protected:
             eval_options.SetIgnoreBreakpoints(true);
             eval_options.SetLanguage(language.name, language.version);
             CarolineTimeStamp(eCarolineStartExprEval, expr, &start_time2);
-            ExpressionResults expr_result = 
target_sp->EvaluateExpression(expr, exe_scope, valobj_sp2, eval_options, 
&fixed_expression);
+            ExpressionResults expr_result = target_sp->EvaluateExpression(
+                expr, exe_scope, valobj_sp2, eval_options, &fixed_expression);
             CarolineTimeStamp(eCarolineEndExprEval, expr, &end_time2);
             // Check only the `error` argument, because doing
             // `valobj_sp->GetError()` will update the value and potentially
diff --git a/lldb/source/Utility/CarolinesTimers.cpp 
b/lldb/source/Utility/CarolinesTimers.cpp
index 11c16c0d2..7e2614328 100644
--- a/lldb/source/Utility/CarolinesTimers.cpp
+++ b/lldb/source/Utility/CarolinesTimers.cpp
@@ -9,13 +9,11 @@
 
 #include <stdio.h>
 
-
 namespace lldb_private {
 
-std::string event_name[(int)CarolineTimerEvent::eCarolineLastItem+1] = {
-  "Start Frame Var", "End Frame Var", "Start ExprEval",
-  "End ExprEval", "Other"
-};
+std::string event_name[(int)CarolineTimerEvent::eCarolineLastItem + 1] = {
+    "Start Frame Var", "End Frame Var", "Start ExprEval", "End ExprEval",
+    "Other"};
 
 static double CalculateTimeDiff(timespec start, timespec end) {
   double start_time;
@@ -24,19 +22,19 @@ static double CalculateTimeDiff(timespec start, timespec 
end) {
 
   start_time = start.tv_sec + ((double)start.tv_nsec / 1000000000);
   end_time = end.tv_sec + ((double)end.tv_nsec / 1000000000);
-  diff =  end_time - start_time;
+  diff = end_time - start_time;
 
   return diff;
 }
 
 static void CarolineGenerateTimeReport(timespec *time_stamps,
-                                       const std::string& expr) {
+                                       const std::string &expr) {
 
   double FrameVar = CalculateTimeDiff(time_stamps[eCarolineStartFrameVar],
-                                       time_stamps[eCarolineEndFrameVar]);
+                                      time_stamps[eCarolineEndFrameVar]);
 
   double ExprEval = CalculateTimeDiff(time_stamps[eCarolineStartExprEval],
-                                       time_stamps[eCarolineEndExprEval]);
+                                      time_stamps[eCarolineEndExprEval]);
 
   std::filesystem::path file_path =
       "/usr/local/google/home/cmtice/dil-report.txt";
@@ -57,20 +55,18 @@ static void CarolineGenerateTimeReport(timespec 
*time_stamps,
 }
 
 void CarolineTimeStamp(CarolineTimerEvent event_kind,
-                       const std::string &in_expr,
-                       timespec *timespec_ptr)
-{
+                       const std::string &in_expr, timespec *timespec_ptr) {
   timespec ts;
-  static timespec time_stamps[eCarolineLastItem+1];
+  static timespec time_stamps[eCarolineLastItem + 1];
   static std::string expr;
   static bool done = false;
 
   // if (event_kind == eCarolineStartFrameVar && timespec_ptr) {
-  //ts.tv_sec = timespec_ptr->tv_sec;
-  //ts.tv_nsec = timespec_ptr->tv_nsec;
-    //} else {
-    timespec_get(&ts, TIME_UTC);
-    //}
+  // ts.tv_sec = timespec_ptr->tv_sec;
+  // ts.tv_nsec = timespec_ptr->tv_nsec;
+  //} else {
+  timespec_get(&ts, TIME_UTC);
+  //}
   time_stamps[event_kind] = ts;
 
   bool all_ok = true;
@@ -86,7 +82,7 @@ void CarolineTimeStamp(CarolineTimerEvent event_kind,
 
   if (event_kind == eCarolineEndExprEval && !done) {
     CarolineGenerateTimeReport(time_stamps, expr);
-    //done = true;
+    // done = true;
     expr.clear();
   }
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/204644
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to