diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2011-08-23 12:25:31 +0200 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2011-08-25 13:19:32 +0200 |
commit | 51ea52971f5ede260034a8e54141adf59309ddf1 (patch) | |
tree | e349f0d73835419109eeda771da8adb96c57e693 /src/libs/cplusplus | |
parent | 29c0f0bfef4af34a3d56a8270b07fa3b1f7c5ed9 (diff) | |
download | qt-creator-51ea52971f5ede260034a8e54141adf59309ddf1.tar.gz |
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: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/libs/cplusplus')
-rw-r--r-- | src/libs/cplusplus/CppDocument.cpp | 10 | ||||
-rw-r--r-- | src/libs/cplusplus/CppDocument.h | 1 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/libs/cplusplus/CppDocument.cpp b/src/libs/cplusplus/CppDocument.cpp index 169ec2b694..e337d7624e 100644 --- a/src/libs/cplusplus/CppDocument.cpp +++ b/src/libs/cplusplus/CppDocument.cpp @@ -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(); } } diff --git a/src/libs/cplusplus/CppDocument.h b/src/libs/cplusplus/CppDocument.h index 024fec93fb..930eb15efa 100644 --- a/src/libs/cplusplus/CppDocument.h +++ b/src/libs/cplusplus/CppDocument.h @@ -335,7 +335,6 @@ private: QAtomicInt _keepSourceAndASTCount; unsigned _revision; unsigned _editorRevision; - bool _fastCheck; friend class Snapshot; }; |