MSVC suppresses a trailing comma if no arguments are passed in place of
a variadic argument[1]. This patch adds a -Wmicrosoft warning when
accepting such code.
Details
Details
- Reviewers
thakis
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Sorry for the slow response. I was reading http://reviews.llvm.org/D15670 to understand this patch, and I couldn't find anything in that patch that enables this extension only in Microsoft mode. Trying suppressed-comma-msextension.cpp locally, it seems to pass without -fms-compatibility too. Am I missing something, or does http://reviews.llvm.org/D15670 lack a check for MicrosoftExt?
Comment Actions
Hmm, is the PP.getLangOpts().MSVCCompat check earlier in MaybeRemoveCommaBeforeVaArgs() insufficient?
(Note that this whole thing mostly builds on top of r167613 which was done by Andy, so it's possible that I needed to do something extra and I forgot that...)