C++: Minor optimization in ResolveExpression

Avoid needless snapshot copying

Change-Id: Iea38bd0866495cf5335b4444d5643d7082fbfcde
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-05-04 20:33:41 +03:00
committed by Orgad Shaneh
parent fc884f6a27
commit a8f42831cb

View File

@@ -604,7 +604,7 @@ bool ResolveExpression::visit(SimpleNameAST *ast)
TypeOfExpression exprTyper;
exprTyper.setExpandTemplates(true);
Document::Ptr doc = _context.snapshot().document(QString::fromLocal8Bit(decl->fileName()));
Document::Ptr doc = _context.document(QString::fromLocal8Bit(decl->fileName()));
exprTyper.init(doc, _context.snapshot(), _context.bindings(),
QSet<const Declaration* >(_autoDeclarationsBeingResolved) << decl);