[PATCH] D39151: [tsan] Fix warnings in tsan_interceptors.cc from expansion of variadic macros

Alex Langford via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 23 10:06:57 PDT 2017


xiaobai added inline comments.


================
Comment at: lib/tsan/rtl/tsan_interceptors.h:59
+  if (!thr->is_inited || thr->ignore_interceptors || thr->in_ignored_lib) \
+    return REAL(func)(__VA_ARGS__);                                       \
+  /**/
----------------
fjricci wrote:
> Is it possible to solve this with `##__VA_ARGS__` instead? Not super familiar with how all of this stuff works though.
Yes, that is one way to solve this. Unfortunately, that is a GNU extension, and is not considered portable. My solution should work on any platform correctly.


https://reviews.llvm.org/D39151





More information about the llvm-commits mailing list