From 9113e5677ca79e88ff4589d7d7819e2f3070e8b3 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 19 Feb 2015 14:05:27 +0100 Subject: [PATCH] catch missing closing braces outside any scope as well it doesn't make a whole lot of sense, but it's possible to create braced blocks which have no semantic meaning. Change-Id: Id55dfdee1aa3fade507cbd1eb34bdffcd7eb6bff Reviewed-by: Joerg Bornemann --- qmake/library/qmakeparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/library/qmakeparser.cpp b/qmake/library/qmakeparser.cpp index 0df3c16ea0b..aff8a1a1abc 100644 --- a/qmake/library/qmakeparser.cpp +++ b/qmake/library/qmakeparser.cpp @@ -841,7 +841,7 @@ void QMakeParser::read(ProFile *pro, const QString &in, int line, SubGrammar gra } flushScopes(tokPtr); - if (m_blockstack.size() > 1) + if (m_blockstack.size() > 1 || m_blockstack.top().braceLevel) parseError(fL1S("Missing closing brace(s).")); while (m_blockstack.size()) leaveScope(tokPtr);