Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Ridge2017-10-10 05:57:08 +0000
committerNathan Ridge2017-10-16 17:11:26 +0000
commit1054a38b4471f007b12afc59114f42b691c91570 (patch)
tree82913230372b9a81002d6502b61d8c02657d07e3 /core/org.eclipse.cdt.core/model/org
parent45101e2a64fb806be7bacaca650104be53702652 (diff)
downloadorg.eclipse.cdt-1054a38b4471f007b12afc59114f42b691c91570.tar.gz
org.eclipse.cdt-1054a38b4471f007b12afc59114f42b691c91570.tar.xz
org.eclipse.cdt-1054a38b4471f007b12afc59114f42b691c91570.zip
Improve tracking of lookup points
ASTCache now sets the AST as the initial lookup point when invoking an ASTRunnable. In addition, OpenDeclarationsJob sets the selected node as a more precise lookup point. Change-Id: I9b32fccd80bc1b13e6da49a80a896b595784b868
Diffstat (limited to 'core/org.eclipse.cdt.core/model/org')
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ASTCache.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ASTCache.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ASTCache.java
index ed895111809..88aa1b7d1cd 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ASTCache.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ASTCache.java
@@ -18,6 +18,7 @@ import org.eclipse.cdt.core.index.IIndexManager;
import org.eclipse.cdt.core.model.ILanguage;
import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.internal.core.dom.parser.ASTTranslationUnit;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.ISafeRunnable;
@@ -216,8 +217,10 @@ public class ASTCache {
return astRunnable.runOnAST(lang, ast);
}
try {
+ CPPSemantics.pushLookupPoint(ast);
return astRunnable.runOnAST(lang, ast);
} finally {
+ CPPSemantics.popLookupPoint();
releaseSharedAST(ast);
}
} catch (CoreException e) {

Back to the top