Match MSVC's handling of commas during macro argument expansion
authorReid Kleckner <reid@kleckner.net>
Wed, 26 Jun 2013 17:16:08 +0000 (17:16 +0000)
committerReid Kleckner <reid@kleckner.net>
Wed, 26 Jun 2013 17:16:08 +0000 (17:16 +0000)
commit596b85cc234d8f5c2fcdb23ade14535a33789c5c
tree2cd0adbca30804d2a66e33e822f6338103503fd1
parentb3f550e8cd5ff1d2304582e95dd494bf955f27d3
Match MSVC's handling of commas during macro argument expansion

This allows clang to parse the type_traits header in Visual Studio 2012,
which is included widely in practice.

This is a rework of r163022 by João Matos.  The original patch broke
preprocessing of gtest headers, which this patch addresses.

Patch by Will Wilson!

llvm-svn: 184968
clang/include/clang/Lex/Token.h
clang/lib/Lex/PPMacroExpansion.cpp
clang/lib/Lex/TokenLexer.cpp
clang/test/Preprocessor/microsoft-ext.c