summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Lex/PPMacroExpansion.cpp6
-rw-r--r--clang/lib/Lex/TokenLexer.cpp6
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()) {
OpenPOWER on IntegriCloud