summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2014-10-28 14:33:39 +0100
committerOlivier Goffart <ogoffart@woboq.com>2014-10-28 19:37:10 +0100
commit27d79ce91b88e550331af78a47dac16d1b11d1b0 (patch)
tree877ce289f6f86ec2704c3c52e3c5e454dc722e6d /src/tools
parent7567e09389fffdf8901aed6501744dd0fcf4a72d (diff)
moc: do not error if the last token of a define is #
We do not need to emit a diagnostic at definition time. The diagnostic will be emit at expansion time. Fix error when parsing boost header: /usr/include/boost/fusion/container/vector/vector.hpp:25: Error: '#' is not followed by a macro parameter Task-number: QTBUG-42233 Change-Id: I27deab362341f17ca3b0160615bb1b0934c3d5c3 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/moc/preprocessor.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp
index 087b064c0f..c5d6b58412 100644
--- a/src/tools/moc/preprocessor.cpp
+++ b/src/tools/moc/preprocessor.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Copyright (C) 2013 Olivier Goffart <ogoffart@woboq.org>
+** Copyright (C) 2014 Olivier Goffart <ogoffart@woboq.org>
** Contact: http://www.qt-project.org/legal
**
** This file is part of the tools applications of the Qt Toolkit.
@@ -1094,10 +1094,6 @@ void Preprocessor::preprocess(const QByteArray &filename, Symbols &preprocessed)
macro.symbols.last().token == PP_HASHHASH) {
error("'##' cannot appear at either end of a macro expansion");
}
- if (macro.symbols.last().token == HASH ||
- macro.symbols.last().token == PP_HASH) {
- error("'#' is not followed by a macro parameter");
- }
}
macros.insert(name, macro);
continue;