forked from qt-creator/qt-creator
Removed obsolete code.
This commit is contained in:
@@ -282,15 +282,6 @@ public:
|
|||||||
_workingCopy(workingCopy)
|
_workingCopy(workingCopy)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
DeprecatedLookupContext lookupContext(unsigned line, unsigned column) const
|
|
||||||
{ return lookupContext(_doc->findSymbolAt(line, column)); }
|
|
||||||
|
|
||||||
DeprecatedLookupContext lookupContext(Symbol *symbol) const
|
|
||||||
{
|
|
||||||
DeprecatedLookupContext context(symbol, Document::create(QLatin1String("<none>")), _doc, _snapshot);
|
|
||||||
return context;
|
|
||||||
}
|
|
||||||
|
|
||||||
void operator()(Document::Ptr doc)
|
void operator()(Document::Ptr doc)
|
||||||
{
|
{
|
||||||
_doc = doc;
|
_doc = doc;
|
||||||
@@ -300,37 +291,6 @@ public:
|
|||||||
if (_workingCopy.contains(doc->fileName()))
|
if (_workingCopy.contains(doc->fileName()))
|
||||||
mode = Document::FullCheck;
|
mode = Document::FullCheck;
|
||||||
|
|
||||||
if (doc->isParsed() && mode == Document::FastCheck) {
|
|
||||||
TranslationUnit *unit = doc->translationUnit();
|
|
||||||
MemoryPool *pool = unit->memoryPool();
|
|
||||||
|
|
||||||
Parser parser(unit);
|
|
||||||
Semantic semantic(unit);
|
|
||||||
|
|
||||||
Namespace *globalNamespace = doc->control()->newNamespace(0);
|
|
||||||
doc->setGlobalNamespace(globalNamespace);
|
|
||||||
|
|
||||||
Scope *globals = globalNamespace->members();
|
|
||||||
|
|
||||||
while (parser.LA()) {
|
|
||||||
unsigned start_declaration = parser.cursor();
|
|
||||||
DeclarationAST *declaration = 0;
|
|
||||||
|
|
||||||
if (parser.parseDeclaration(declaration)) {
|
|
||||||
semantic.check(declaration, globals);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
doc->translationUnit()->error(start_declaration, "expected a declaration");
|
|
||||||
parser.rewind(start_declaration + 1);
|
|
||||||
parser.skipUntilDeclaration();
|
|
||||||
}
|
|
||||||
|
|
||||||
parser.clearTemplateArgumentList();
|
|
||||||
pool->reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
doc->parse();
|
|
||||||
doc->check(mode);
|
doc->check(mode);
|
||||||
|
|
||||||
if (mode == Document::FullCheck) {
|
if (mode == Document::FullCheck) {
|
||||||
@@ -343,7 +303,6 @@ public:
|
|||||||
|
|
||||||
checkUndefinedSymbols(doc->translationUnit()->ast()); // ### FIXME
|
checkUndefinedSymbols(doc->translationUnit()->ast()); // ### FIXME
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
doc->releaseTranslationUnit();
|
doc->releaseTranslationUnit();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user