Skip to content
Snippets Groups Projects
Commit 5058dd67 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Reuse TypeOfExpression.

parent 18490596
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,6 @@
**************************************************************************/
#include "FindUsages.h"
#include "TypeOfExpression.h"
#include "DeprecatedLookupContext.h"
#include <Control.h>
......@@ -54,6 +53,7 @@ FindUsages::FindUsages(Document::Ptr doc, const Snapshot &snapshot)
_inQProperty(false)
{
_snapshot.insert(_doc);
typeofExpression.init(_doc, _snapshot, _context.bindings());
}
void FindUsages::setGlobalNamespaceBinding(NamespaceBindingPtr globalNamespaceBinding)
......@@ -269,9 +269,6 @@ void FindUsages::checkExpression(unsigned startToken, unsigned endToken)
const QString expression = _source.mid(begin, end - begin);
// qDebug() << "*** check expression:" << expression;
TypeOfExpression typeofExpression;
typeofExpression.init(_doc, _snapshot);
unsigned line, column;
getTokenStartPosition(startToken, &line, &column);
Scope *scope = _doc->scopeAt(line, column);
......
......@@ -34,6 +34,7 @@
#include "CppDocument.h"
#include "CppBindings.h"
#include "Semantic.h"
#include "TypeOfExpression.h"
#include <ASTVisitor.h>
#include <QtCore/QSet>
......@@ -119,6 +120,7 @@ private:
int _inSimpleDeclaration;
bool _inQProperty;
QSet<unsigned> _processed;
TypeOfExpression typeofExpression;
};
} // end of namespace CPlusPlus
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment