forked from qt-creator/qt-creator
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)
This commit is contained in:
@@ -861,7 +861,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);
|
||||
|
||||
Reference in New Issue
Block a user