summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tools/moc/preprocessor.cpp6
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp2
2 files changed, 1 insertions, 7 deletions
diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp
index 30fed460eb..087b064c0f 100644
--- a/src/tools/moc/preprocessor.cpp
+++ b/src/tools/moc/preprocessor.cpp
@@ -632,12 +632,6 @@ Symbols Preprocessor::macroExpandIdentifier(Preprocessor *that, SymbolStack &sym
if (macro.isVariadic && arguments.size() == macro.arguments.size() - 1)
arguments += Symbols();
- if (arguments.size() != macro.arguments.size() &&
- // 0 argument macros are a bit special. They are ok if the
- // argument is pure whitespace or empty
- (macro.arguments.size() != 0 || arguments.size() != 1 || !arguments.at(0).isEmpty()))
- that->warning("Macro argument mismatch.");
-
// now replace the macro arguments with the expanded arguments
enum Mode {
Normal,
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index ec3dbd46a9..13e786cd20 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -1837,7 +1837,7 @@ void tst_Moc::warnings_data()
<< QStringList()
<< 0
<< QString("IGNORE_ALL_STDOUT")
- << QString(":3: Warning: Macro argument mismatch.\n:4: Warning: Macro argument mismatch.");
+ << QString();
QTest::newRow("Class declaration lacks Q_OBJECT macro.")
<< QByteArray("class X : public QObject \n { \n public slots: \n void foo() {} \n };")