forked from qt-creator/qt-creator
Get rid of the old Semantic pass.
This commit is contained in:
@@ -36,7 +36,6 @@
|
||||
#include <Control.h>
|
||||
#include <TranslationUnit.h>
|
||||
#include <DiagnosticClient.h>
|
||||
#include <Semantic.h>
|
||||
#include <Literals.h>
|
||||
#include <Symbols.h>
|
||||
#include <Names.h>
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
#include "LookupContext.h"
|
||||
#include "CppDocument.h"
|
||||
#include "Semantic.h"
|
||||
#include "TypeOfExpression.h"
|
||||
#include <ASTVisitor.h>
|
||||
#include <QtCore/QSet>
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "Overview.h"
|
||||
|
||||
#include <Scope.h>
|
||||
#include <Semantic.h>
|
||||
#include <Literals.h>
|
||||
#include <Symbols.h>
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ ResolveExpression::ResolveExpression(const LookupContext &context)
|
||||
: ASTVisitor(context.expressionDocument()->translationUnit()),
|
||||
_scope(0),
|
||||
_context(context),
|
||||
sem(context.expressionDocument()->translationUnit())
|
||||
bind(context.expressionDocument()->translationUnit())
|
||||
{ }
|
||||
|
||||
ResolveExpression::~ResolveExpression()
|
||||
@@ -174,7 +174,7 @@ bool ResolveExpression::visit(BinaryExpressionAST *ast)
|
||||
bool ResolveExpression::visit(CastExpressionAST *ast)
|
||||
{
|
||||
Scope *dummyScope = _context.expressionDocument()->globalNamespace();
|
||||
FullySpecifiedType ty = sem.check(ast->type_id, dummyScope);
|
||||
FullySpecifiedType ty = bind(ast->type_id, dummyScope);
|
||||
addResult(ty, _scope);
|
||||
return false;
|
||||
}
|
||||
@@ -199,7 +199,7 @@ bool ResolveExpression::visit(ConditionalExpressionAST *ast)
|
||||
bool ResolveExpression::visit(CppCastExpressionAST *ast)
|
||||
{
|
||||
Scope *dummyScope = _context.expressionDocument()->globalNamespace();
|
||||
FullySpecifiedType ty = sem.check(ast->type_id, dummyScope);
|
||||
FullySpecifiedType ty = bind(ast->type_id, dummyScope);
|
||||
addResult(ty, _scope);
|
||||
return false;
|
||||
}
|
||||
@@ -221,8 +221,7 @@ bool ResolveExpression::visit(NewExpressionAST *ast)
|
||||
{
|
||||
if (ast->new_type_id) {
|
||||
Scope *dummyScope = _context.expressionDocument()->globalNamespace();
|
||||
FullySpecifiedType ty = sem.check(ast->new_type_id->type_specifier_list, dummyScope);
|
||||
ty = sem.check(ast->new_type_id->ptr_operator_list, ty, dummyScope);
|
||||
FullySpecifiedType ty = bind(ast->new_type_id, dummyScope);
|
||||
FullySpecifiedType ptrTy(control()->pointerType(ty));
|
||||
addResult(ptrTy, _scope);
|
||||
}
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
#include "LookupContext.h"
|
||||
|
||||
#include <ASTVisitor.h>
|
||||
#include <Semantic.h>
|
||||
#include <FullySpecifiedType.h>
|
||||
#include <Bind.h>
|
||||
|
||||
namespace CPlusPlus {
|
||||
|
||||
@@ -115,9 +115,8 @@ protected:
|
||||
private:
|
||||
Scope *_scope;
|
||||
LookupContext _context;
|
||||
Semantic sem;
|
||||
Bind bind;
|
||||
QList<LookupItem> _results;
|
||||
Symbol *_declSymbol;
|
||||
};
|
||||
|
||||
} // end of namespace CPlusPlus
|
||||
|
||||
Reference in New Issue
Block a user