forked from qt-creator/qt-creator
Reuse TypeOfExpression.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user