[Preprocessor] MSVC Preprocessor compatibility fixes

Hi all, I've prepared a number of fixes to the preprocessor in the name of MSVC compatibility!

https://reviews.llvm.org/D32046
https://reviews.llvm.org/D32049
https://reviews.llvm.org/D32050
https://reviews.llvm.org/D32051
https://reviews.llvm.org/D32052

Since Richard Smith is the only one who has any chance of being the code owner here, and because Reid is our MSVC compatibility Czar, I added them to the review. However, if anyone knows of anyone with sufficient knowledge of the preprocessor, I'd appreciate it if you could add them to the review as well!

Thanks all,
Erich

General comments:

Responses inline, sorry for the goofy formatting, using Outlook.

Responses inline, sorry for the goofy formatting, using Outlook.

*From:* thakis@google.com [mailto:thakis@google.com] *On Behalf Of *Nico
Weber
*Sent:* Thursday, April 13, 2017 2:36 PM
*To:* Keane, Erich <erich.keane@intel.com>
*Cc:* cfe-dev@lists.llvm.org
*Subject:* Re: [cfe-dev] [Preprocessor] MSVC Preprocessor compatibility
fixes

General comments:

* Are these necessary for parsing system headers?

*[Keane, Erich] No, these are all based on our internal test suite,
usually because they were used in some sort of open source project.*

Is it possible to fix the project instead?

General comments:
* Are these necessary for parsing system headers?
[Keane, Erich] No, these are all based on our internal test suite, usually because they were used in some sort of open source project.

Is it possible to fix the project instead?
[Keane, Erich] For the most part, no. Most of these are things that are fairly ubiquitously used/abused in the MS world. In many cases (where they came from our test suite), I don’t know where the original code IS, since it is in some closed-soruce software.

  Our “Windows Dashboard” has a pretty poor compilation success rate, of which these seem to matter quite a bit.
* Is it possible to emit some -Wmicrosoft warning for when we do these? (https://docs.google.com/presentation/d/1oxNHaVjA9Gn_rTzX6HIpJHP7nXRua_0URXxxJ3oYRq0/edit#slide=id.g71ecd450e_2_812)
[Keane, Erich] Possible? Sure. I didn’t see any existing warning for this case in the current __VA_ARGS__ situation, but if consensus is that we should do so, I can definitely add that.