diff options
author | Nico Weber <nicolasweber@gmx.de> | 2012-09-26 08:19:01 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2012-09-26 08:19:01 +0000 |
commit | 93dec51750411678bb9c5bc1b27b259f5f5a23bd (patch) | |
tree | aadf5413d552aee2e61b049e459e641f2689552c /lib/Lex | |
parent | c5e3df7d9951502fe016445f1c93dc9a3efea4df (diff) |
Revert r163022, it caused PR13924.
Add a test for PR13924. Do not revert the test added in r163022,
it surprisingly still passes even after reverting the code changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164672 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex')
-rw-r--r-- | lib/Lex/PPMacroExpansion.cpp | 6 | ||||
-rw-r--r-- | lib/Lex/TokenLexer.cpp | 6 |
2 files changed, 1 insertions, 11 deletions
diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp index dcaa5a6636..1ef534daa7 100644 --- a/lib/Lex/PPMacroExpansion.cpp +++ b/lib/Lex/PPMacroExpansion.cpp @@ -419,11 +419,7 @@ MacroArgs *Preprocessor::ReadFunctionLikeMacroArgs(Token &MacroName, } } else if (Tok.is(tok::l_paren)) { ++NumParens; - // In Microsoft-compatibility mode, commas from nested macro expan- - // sions should not be considered as argument separators. We test - // for this with the IgnoredComma token flag. - } else if (Tok.is(tok::comma) - && !(Tok.getFlags() & Token::IgnoredComma) && NumParens == 0) { + } else if (Tok.is(tok::comma) && NumParens == 0) { // Comma ends this argument if there are more fixed arguments expected. // However, if this is a variadic macro, and this is part of the // variadic part, then the comma is just an argument token. diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp index 379b5f3ec8..2e3e7c3721 100644 --- a/lib/Lex/TokenLexer.cpp +++ b/lib/Lex/TokenLexer.cpp @@ -225,12 +225,6 @@ void TokenLexer::ExpandFunctionArguments() { Token &Tok = ResultToks[i]; if (Tok.is(tok::hashhash)) Tok.setKind(tok::unknown); - // In Microsoft-compatibility mode, we follow MSVC's preprocessing - // behaviour by not considering commas from nested macro expansions - // as argument separators. Set a flag on the token so we can test - // for this later when the macro expansion is processed. - if (Tok.is(tok::comma) && PP.getLangOpts().MicrosoftMode) - Tok.setFlag(Token::IgnoredComma); } if(ExpandLocStart.isValid()) { |