Cache the macros.

This commit is contained in:
Roberto Raggi
2009-09-30 18:52:19 +02:00
parent 06bba1dc78
commit ae43149c97
4 changed files with 34 additions and 46 deletions

View File

@@ -2069,7 +2069,7 @@ SemanticInfo SemanticHighlighter::semanticInfo(const Source &source)
snapshot = source.snapshot;
doc = source.snapshot.documentFromSource(preprocessedCode, source.fileName);
FastMacroResolver fastMacroResolver(snapshot);
FastMacroResolver fastMacroResolver(doc->translationUnit(), snapshot);
doc->control()->setMacroResolver(&fastMacroResolver);
doc->check();
doc->control()->setMacroResolver(0);