forked from qt-creator/qt-creator
Speed up the comutation of the local members.
This commit is contained in:
@@ -187,12 +187,8 @@ bool CheckDeclaration::visit(SimpleDeclarationAST *ast)
|
||||
_scope, &name);
|
||||
|
||||
unsigned location = semantic()->location(it->value);
|
||||
if (! location) {
|
||||
if (it->value)
|
||||
location = it->value->firstToken();
|
||||
else
|
||||
location = ast->firstToken();
|
||||
}
|
||||
if (! location)
|
||||
location = ast->firstToken();
|
||||
|
||||
Function *fun = 0;
|
||||
if (declTy && 0 != (fun = declTy->asFunctionType())) {
|
||||
|
||||
@@ -123,7 +123,7 @@ bool CheckExpression::visit(ConditionAST *ast)
|
||||
const Name *name = 0;
|
||||
FullySpecifiedType declTy = semantic()->check(ast->declarator, typeSpecTy.qualifiedType(),
|
||||
_scope, &name);
|
||||
Declaration *decl = control()->newDeclaration(ast->declarator->firstToken(), name);
|
||||
Declaration *decl = control()->newDeclaration(semantic()->location(ast->declarator), name);
|
||||
decl->setType(declTy);
|
||||
_scope->enterSymbol(decl);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user