mgorny updated this revision to Diff 188430.
mgorny retitled this revision from "[lldb] [unittests] Silence 
-Wformat-zero-length warnings in UtilityTests" to "[lldb] [unittests] Use 
non-empty format string for Timer()".
mgorny edited the summary of this revision.
mgorny added a comment.

Changed to use '.' instead. Thanks for the suggestion, I like this option more 
too ;-). I have wrongly assumed the tests purposely check whether empty string 
works correctly.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58680/new/

https://reviews.llvm.org/D58680

Files:
  lldb/unittests/Utility/TimerTest.cpp


Index: lldb/unittests/Utility/TimerTest.cpp
===================================================================
--- lldb/unittests/Utility/TimerTest.cpp
+++ lldb/unittests/Utility/TimerTest.cpp
@@ -17,7 +17,7 @@
   Timer::ResetCategoryTimes();
   {
     static Timer::Category tcat("CAT1");
-    Timer t(tcat, "");
+    Timer t(tcat, ".");
     std::this_thread::sleep_for(std::chrono::milliseconds(10));
   }
   StreamString ss;
@@ -32,10 +32,10 @@
   Timer::ResetCategoryTimes();
   {
     static Timer::Category tcat1("CAT1");
-    Timer t1(tcat1, "");
+    Timer t1(tcat1, ".");
     std::this_thread::sleep_for(std::chrono::milliseconds(10));
     // Explicitly testing the same category as above.
-    Timer t2(tcat1, "");
+    Timer t2(tcat1, ".");
     std::this_thread::sleep_for(std::chrono::milliseconds(10));
   }
   StreamString ss;
@@ -52,10 +52,10 @@
   Timer::ResetCategoryTimes();
   {
     static Timer::Category tcat1("CAT1");
-    Timer t1(tcat1, "");
+    Timer t1(tcat1, ".");
     std::this_thread::sleep_for(std::chrono::milliseconds(100));
     static Timer::Category tcat2("CAT2");
-    Timer t2(tcat2, "");
+    Timer t2(tcat2, ".");
     std::this_thread::sleep_for(std::chrono::milliseconds(10));
   }
   StreamString ss;


Index: lldb/unittests/Utility/TimerTest.cpp
===================================================================
--- lldb/unittests/Utility/TimerTest.cpp
+++ lldb/unittests/Utility/TimerTest.cpp
@@ -17,7 +17,7 @@
   Timer::ResetCategoryTimes();
   {
     static Timer::Category tcat("CAT1");
-    Timer t(tcat, "");
+    Timer t(tcat, ".");
     std::this_thread::sleep_for(std::chrono::milliseconds(10));
   }
   StreamString ss;
@@ -32,10 +32,10 @@
   Timer::ResetCategoryTimes();
   {
     static Timer::Category tcat1("CAT1");
-    Timer t1(tcat1, "");
+    Timer t1(tcat1, ".");
     std::this_thread::sleep_for(std::chrono::milliseconds(10));
     // Explicitly testing the same category as above.
-    Timer t2(tcat1, "");
+    Timer t2(tcat1, ".");
     std::this_thread::sleep_for(std::chrono::milliseconds(10));
   }
   StreamString ss;
@@ -52,10 +52,10 @@
   Timer::ResetCategoryTimes();
   {
     static Timer::Category tcat1("CAT1");
-    Timer t1(tcat1, "");
+    Timer t1(tcat1, ".");
     std::this_thread::sleep_for(std::chrono::milliseconds(100));
     static Timer::Category tcat2("CAT2");
-    Timer t2(tcat2, "");
+    Timer t2(tcat2, ".");
     std::this_thread::sleep_for(std::chrono::milliseconds(10));
   }
   StreamString ss;
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to