Commit 51ea5297 authored by Christian Kamm's avatar Christian Kamm
Browse files

C++: Always remove NumericLiterals when removing the AST.

Contrary to StringLiterals, keeping them around is unnecessary.

Change-Id: Idc1967c125e1373e69ce4c7640328d323a84ec14
Reviewed-on: http://codereview.qt.nokia.com/3395

Reviewed-by: default avatarRoberto Raggi <roberto.raggi@nokia.com>
parent 29c0f0bf
......@@ -256,8 +256,7 @@ Document::Document(const QString &fileName)
: _fileName(QDir::cleanPath(fileName)),
_globalNamespace(0),
_revision(0),
_editorRevision(0),
_fastCheck(false)
_editorRevision(0)
{
_control = new Control();
......@@ -575,10 +574,8 @@ void Document::check(CheckMode mode)
_globalNamespace = _control->newNamespace(0);
Bind semantic(_translationUnit);
if (mode == FastCheck) {
_fastCheck = true;
if (mode == FastCheck)
semantic.setSkipFunctionBodies(true);
}
if (! _translationUnit->ast())
return; // nothing to do.
......@@ -602,8 +599,7 @@ void Document::releaseSourceAndAST()
if (!_keepSourceAndASTCount.deref()) {
_source.clear();
_translationUnit->release();
if (_fastCheck)
_control->squeeze();
_control->squeeze();
}
}
......
......@@ -335,7 +335,6 @@ private:
QAtomicInt _keepSourceAndASTCount;
unsigned _revision;
unsigned _editorRevision;
bool _fastCheck;
friend class Snapshot;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment