aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/PPMacroExpansion.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-04-22 23:25:09 +0000
committerChris Lattner <sabre@nondot.org>2011-04-22 23:25:09 +0000
commit32c1388f0feef4ea147f881415f5a7225e8cadcc (patch)
tree59536508bb0dc4b621ac640563b366ff5734b821 /lib/Lex/PPMacroExpansion.cpp
parentd4a0caf78e7c18e7aca65fbfd799a6c024ff51fb (diff)
don't warn about empty macro arguments in c++'0x mode, since it sucked in
the c99 preprocessor. Patch by Jonathan Sauer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130031 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPMacroExpansion.cpp')
-rw-r--r--lib/Lex/PPMacroExpansion.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp
index b078bc8577..f0b0fad488 100644
--- a/lib/Lex/PPMacroExpansion.cpp
+++ b/lib/Lex/PPMacroExpansion.cpp
@@ -410,9 +410,9 @@ MacroArgs *Preprocessor::ReadFunctionLikeMacroArgs(Token &MacroName,
return 0;
}
- // Empty arguments are standard in C99 and supported as an extension in
+ // Empty arguments are standard in C99 and C++0x, and are supported as an extension in
// other modes.
- if (ArgTokens.size() == ArgTokenStart && !Features.C99)
+ if (ArgTokens.size() == ArgTokenStart && !Features.C99 && !Features.CPlusPlus0x)
Diag(Tok, diag::ext_empty_fnmacro_arg);
// Add a marker EOF token to the end of the token list for this argument.