[PATCH] Emulate MSVC handling of commas during macro arg expansion

Aaron Ballman aaron at aaronballman.com
Wed Jun 26 10:20:31 PDT 2013


On Wed, Jun 26, 2013 at 1:18 PM, Reid Kleckner <rnk at google.com> wrote:
> I also tried this patch on a bunch of gtest code and on an iostream hello
> world program using VS 2012's iostream and it works for both.  Awesome!
>
> I can also repro the assertions Aaron hits in the Preprocessor tests.
> They're caused by:
> -    HasUCN = 0x40          // This identifier contains a UCN.
> +    HasUCN = 0x40,         // This identifier contains a UCN.
> +    IgnoredComma = 0x08,   // This comma is not a macro argument separator
> (MS).
>
> It should be 0x80, not 0x08.
>
> With that change, everything passes, and I committed it as r184968.

Good catch, and thanks!

~Aaron



More information about the cfe-commits mailing list