Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2012-08-03 22:35:06 +0000
committerSergey Prigogin2012-08-03 22:35:06 +0000
commitc74cc8a309084c1aaee128b750eeefd834b3f550 (patch)
tree27d8e1a5da69f5117e0f7929043b4643525df531 /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java
parent202f1d095e34e5f93761c1aa47fa0568ad9b075b (diff)
downloadorg.eclipse.cdt-c74cc8a309084c1aaee128b750eeefd834b3f550.tar.gz
org.eclipse.cdt-c74cc8a309084c1aaee128b750eeefd834b3f550.tar.xz
org.eclipse.cdt-c74cc8a309084c1aaee128b750eeefd834b3f550.zip
Bug 299911. Improved propagation of name lookup context.
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java32
1 files changed, 18 insertions, 14 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java
index 82af915cf26..0c02d4274c4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/AbstractCPPClassSpecializationScope.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
* Markus Schorn (Wind River Systems)
* Bryan Wilkinson (QNX)
* Andrew Ferguson (Symbian)
+ * Sergey Prigogin (Google)
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp;
@@ -181,15 +182,18 @@ public class AbstractCPPClassSpecializationScope implements ICPPClassSpecializat
}
@Override
- public ICPPField[] getDeclaredFields() {
- IASTNode point= null; // Instantiation of dependent expression may not work.
+ public ICPPField[] getDeclaredFields(IASTNode point) {
ICPPField[] fields= specialClass.getSpecializedBinding().getDeclaredFields();
return specializeMembers(fields, point);
}
-
+
@Override
public ICPPMethod[] getImplicitMethods() {
- IASTNode point= null; // Instantiation of dependent expression may not work.
+ return getImplicitMethods(null); // Instantiation of dependent expression may not work.
+ }
+
+ @Override
+ public ICPPMethod[] getImplicitMethods(IASTNode point) {
ICPPClassScope origClassScope= (ICPPClassScope) specialClass.getSpecializedBinding().getCompositeScope();
if (origClassScope == null) {
return ICPPMethod.EMPTY_CPPMETHOD_ARRAY;
@@ -207,29 +211,29 @@ public class AbstractCPPClassSpecializationScope implements ICPPClassSpecializat
@Override
public ICPPConstructor[] getConstructors() {
- // mstodo need to pass the point of instantiation
- IASTNode point= null; // Instantiation of dependent expression may not work.
+ return getConstructors(null); // Instantiation of dependent expression may not work.
+ }
+
+ @Override
+ public ICPPConstructor[] getConstructors(IASTNode point) {
ICPPConstructor[] ctors= specialClass.getSpecializedBinding().getConstructors();
return specializeMembers(ctors, point);
}
-
+
@Override
- public ICPPMethod[] getDeclaredMethods() {
- IASTNode point= null; // Instantiation of dependent expression may not work.
+ public ICPPMethod[] getDeclaredMethods(IASTNode point) {
ICPPMethod[] bindings = specialClass.getSpecializedBinding().getDeclaredMethods();
return specializeMembers(bindings, point);
}
@Override
- public ICPPClassType[] getNestedClasses() {
- IASTNode point= null; // Instantiation of dependent expression may not work.
+ public ICPPClassType[] getNestedClasses(IASTNode point) {
ICPPClassType[] bindings = specialClass.getSpecializedBinding().getNestedClasses();
return specializeMembers(bindings, point);
}
@Override
- public IBinding[] getFriends() {
- IASTNode point= null; // Instantiation of dependent expression may not work.
+ public IBinding[] getFriends(IASTNode point) {
IBinding[] friends = specialClass.getSpecializedBinding().getFriends();
return specializeMembers(friends, point);
}

Back to the top