Don't use named variadic macro parameters
authorChristopher Dykes <cdykes@fb.com>
Fri, 1 Jul 2016 01:47:32 +0000 (18:47 -0700)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Fri, 1 Jul 2016 01:53:22 +0000 (18:53 -0700)
Summary: MSVC doesn't support them, so use `__VA_ARGS__` instead.

Reviewed By: yfeldblum

Differential Revision: D3507071

fbshipit-source-id: 186834c87e74257c709fcbc08e3bda7b1b55d02b

folly/test/DeterministicSchedule.h
folly/test/SharedMutexTest.cpp

index b04e613a1f0ee5f5a79e40d1f3ecabe74385d2c4..c6a1aeb21c47be5cb855d2227e28d3b4e1e47d9a 100644 (file)
@@ -37,11 +37,12 @@ namespace test {
 
 // This is ugly, but better perf for DeterministicAtomic translates
 // directly to more states explored and tested
 
 // This is ugly, but better perf for DeterministicAtomic translates
 // directly to more states explored and tested
-#define FOLLY_TEST_DSCHED_VLOG(msg...)                                  \
-  do {                                                                  \
-    if (false) {                                                        \
-      VLOG(2) << std::hex << std::this_thread::get_id() << ": " << msg; \
-    }                                                                   \
+#define FOLLY_TEST_DSCHED_VLOG(...)                             \
+  do {                                                          \
+    if (false) {                                                \
+      VLOG(2) << std::hex << std::this_thread::get_id() << ": " \
+              << __VA_ARGS__;                                   \
+    }                                                           \
   } while (false)
 
 /**
   } while (false)
 
 /**
index da567f835c00e35549c49f6184d731fa65df9bb0..43e6dd174d2f5de104173b0e31b51ae8346884f3 100644 (file)
@@ -1371,8 +1371,8 @@ BENCHMARK(single_thread_lock_unlock, iters) {
   }
 }
 
   }
 }
 
-#define BENCH_BASE(args...) BENCHMARK_NAMED_PARAM(args)
-#define BENCH_REL(args...) BENCHMARK_RELATIVE_NAMED_PARAM(args)
+#define BENCH_BASE(...) BENCHMARK_NAMED_PARAM(__VA_ARGS__)
+#define BENCH_REL(...) BENCHMARK_RELATIVE_NAMED_PARAM(__VA_ARGS__)
 
 // 100% reads.  Best-case scenario for deferred locks.  Lock is colocated
 // with read data, so inline lock takes cache miss every time but deferred
 
 // 100% reads.  Best-case scenario for deferred locks.  Lock is colocated
 // with read data, so inline lock takes cache miss every time but deferred