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 | dd9602fe935d500d10acde5798ee659488d6921e (patch) | |
| tree | 7c0d1c213571706e51315c36a97a6b651880a9d2 /clang/lib | |
| parent | a221eea7db747c950fef8b1b08e159065f842f1e (diff) | |
| download | bcm5719-llvm-dd9602fe935d500d10acde5798ee659488d6921e.tar.gz bcm5719-llvm-dd9602fe935d500d10acde5798ee659488d6921e.zip | |
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.
llvm-svn: 164672
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Lex/PPMacroExpansion.cpp | 6 | ||||
| -rw-r--r-- | clang/lib/Lex/TokenLexer.cpp | 6 |
2 files changed, 1 insertions, 11 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index dcaa5a66362..1ef534daa76 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/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/clang/lib/Lex/TokenLexer.cpp b/clang/lib/Lex/TokenLexer.cpp index 379b5f3ec86..2e3e7c37213 100644 --- a/clang/lib/Lex/TokenLexer.cpp +++ b/clang/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()) { |

