[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 15:31:04 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:
> xiaobai wrote:
> > 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.
> Looks like clang supports it, and I believe that we don't support tsan on windows (so don't need to worry about MSVC). But I'll defer to other reviewers on the best way.
Sure, I think it's totally fine to use the GNU extension. However, if supporting tsan on windows is something people want, this solution will probably be better.
https://reviews.llvm.org/D39151
More information about the llvm-commits
mailing list