Refactored the AST visitors.

Now, the ASTVisitor constructor takes a valid reference to a TranslationUnit.
This commit is contained in:
Roberto Raggi
2009-11-17 13:28:20 +01:00
parent 04a333bac6
commit 5d7def6d2a
13 changed files with 49 additions and 32 deletions

View File

@@ -41,12 +41,12 @@
using namespace CPlusPlus;
FindUsages::FindUsages(Document::Ptr doc, const Snapshot &snapshot, QFutureInterface<Usage> *future)
: ASTVisitor(doc->control()),
: ASTVisitor(doc->translationUnit()),
_future(future),
_doc(doc),
_snapshot(snapshot),
_source(_doc->source()),
_sem(doc->control()),
_sem(doc->translationUnit()),
_inSimpleDeclaration(0)
{
_snapshot.insert(_doc);