Work around MSVC compiler intricacies.
authorAdrian Prantl <aprantl@apple.com>
Tue, 15 Jun 2021 15:17:28 +0000 (08:17 -0700)
committerAdrian Prantl <aprantl@apple.com>
Tue, 15 Jun 2021 15:17:56 +0000 (08:17 -0700)
lldb/include/lldb/Utility/Timer.h

index ae30e71..4696a80 100644 (file)
@@ -47,7 +47,11 @@ public:
 
   /// Default constructor.
   Timer(Category &category, const char *format, ...)
-      __attribute__((format(printf, 3, 4)));
+#if !defined(_MSC_VER)
+  // MSVC appears to have trouble recognizing the this argument in the constructor.
+      __attribute__((format(printf, 3, 4)))
+#endif
+    ;
 
   /// Destructor
   ~Timer();