forked from qt-creator/qt-creator
Use the document in the snapshot when available.
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace CPlusPlus {
|
||||
class CPLUSPLUS_EXPORT CheckUndefinedSymbols: protected ASTVisitor
|
||||
{
|
||||
public:
|
||||
CheckUndefinedSymbols(Document::Ptr doc, const Snapshot &snapshot);
|
||||
CheckUndefinedSymbols(TranslationUnit *unit, const LookupContext &context);
|
||||
virtual ~CheckUndefinedSymbols();
|
||||
|
||||
QList<Document::DiagnosticMessage> operator()(AST *ast);
|
||||
|
||||
Reference in New Issue
Block a user