Use the document in the snapshot when available.

This commit is contained in:
Roberto Raggi
2010-05-25 10:47:49 +02:00
parent 3141edd2ab
commit 2a0f901e16
3 changed files with 19 additions and 10 deletions

View File

@@ -42,10 +42,10 @@
using namespace CPlusPlus;
CheckUndefinedSymbols::CheckUndefinedSymbols(Document::Ptr doc, const Snapshot &snapshot)
: ASTVisitor(doc->translationUnit()), _context(doc, snapshot)
CheckUndefinedSymbols::CheckUndefinedSymbols(TranslationUnit *unit, const LookupContext &context)
: ASTVisitor(unit), _context(context)
{
_fileName = doc->fileName();
_fileName = context.thisDocument()->fileName();
}
CheckUndefinedSymbols::~CheckUndefinedSymbols()