[Lldb-commits] [PATCH] D58680: [lldb] [unittests] Use non-empty format string for Timer()

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 26 11:43:16 PST 2019


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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58680.188430.patch
Type: text/x-patch
Size: 1251 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190226/7f31b9da/attachment.bin>


More information about the lldb-commits mailing list