Skip to main content
summaryrefslogtreecommitdiffstats
path: root/qt
diff options
context:
space:
mode:
authorNathan Ridge2017-06-11 15:06:25 -0400
committerNathan Ridge2017-09-25 12:51:22 -0400
commit64709c980ddb83dde1ecef0794b976b89cdf7550 (patch)
tree22e06bd4953dc40089f6e90f837d16f4a2ea3e33 /qt
parent9869cbc9bacf716995a616434f9d635928dcca01 (diff)
downloadorg.eclipse.cdt-64709c980ddb83dde1ecef0794b976b89cdf7550.tar.gz
org.eclipse.cdt-64709c980ddb83dde1ecef0794b976b89cdf7550.tar.xz
org.eclipse.cdt-64709c980ddb83dde1ecef0794b976b89cdf7550.zip
Bug 513105 - Store the current lookup point in a thread-local static stack rather than passing it around everywhere
Diffstat (limited to 'qt')
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/ASTUtil.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/ASTUtil.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/ASTUtil.java
index e702bbb9ba..5e923cf3eb 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/ASTUtil.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/ASTUtil.java
@@ -38,6 +38,7 @@ import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
import org.eclipse.cdt.internal.qt.core.index.IQMethod;
import org.eclipse.cdt.internal.qt.core.index.IQObject;
@@ -142,7 +143,12 @@ public class ASTUtil {
ICPPASTInitializerClause cppInit = (ICPPASTInitializerClause) init;
ICPPEvaluation eval = cppInit.getEvaluation();
- return eval == null ? null : getBaseType(eval.getType(cppInit));
+ try {
+ CPPSemantics.pushLookupPoint(cppInit);
+ return eval == null ? null : getBaseType(eval.getType());
+ } finally {
+ CPPSemantics.popLookupPoint();
+ }
}
public static ICPPClassType getReceiverType(IASTFunctionCallExpression fncall) {

Back to the top