summaryrefslogtreecommitdiffstats
path: root/src/linguist/shared/qmakeparser.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-02-19 14:05:27 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-12-18 14:44:03 +0000
commitc103550d9ab3fcbafb6d8140433a22e023c024d7 (patch)
tree12d0ae71cdd02d5e2dd7520ca9e3b9bad417f033 /src/linguist/shared/qmakeparser.cpp
parentb42766a0e198eef4d99b8a691505bfe743c20932 (diff)
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 <joerg.bornemann@theqtcompany.com> (cherry picked from qtbase/9113e5677ca79e88ff4589d7d7819e2f3070e8b3)
Diffstat (limited to 'src/linguist/shared/qmakeparser.cpp')
-rw-r--r--src/linguist/shared/qmakeparser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linguist/shared/qmakeparser.cpp b/src/linguist/shared/qmakeparser.cpp
index 8d221389a..12c0be3c7 100644
--- a/src/linguist/shared/qmakeparser.cpp
+++ b/src/linguist/shared/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);