Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2014-01-15 23:06:08 -0500
committerSergey Prigogin2014-01-15 23:06:08 -0500
commit8d14ab8793d3a50857bcb159242146f654a77af3 (patch)
tree4a608e0e9db3e5b9dbf272c6f56f02a755f974b9
parentf1639f8a859821bd2767f1ca7decc8eff3fa3d18 (diff)
downloadorg.eclipse.cdt-8d14ab8793d3a50857bcb159242146f654a77af3.tar.gz
org.eclipse.cdt-8d14ab8793d3a50857bcb159242146f654a77af3.tar.xz
org.eclipse.cdt-8d14ab8793d3a50857bcb159242146f654a77af3.zip
Bug 425833 - IllegalArgumentException I is not a member of Cls1
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMemberBlock.java16
1 files changed, 7 insertions, 9 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMemberBlock.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMemberBlock.java
index 4fbbeb05727..09fff8b6d20 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMemberBlock.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPMemberBlock.java
@@ -15,6 +15,7 @@ package org.eclipse.cdt.internal.core.pdom.dom.cpp;
import org.eclipse.cdt.core.dom.IPDOMVisitor;
import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.db.Database;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMLinkage;
@@ -135,7 +136,7 @@ public class PDOMCPPMemberBlock {
int item = 0;
long memberRecord;
while (item < MAX_MEMBER_COUNT && (memberRecord = getMemberRecord(item++)) != 0) {
- PDOMNode node = linkage.getNode(memberRecord);
+ PDOMNode node = PDOMNode.load(getPDOM(), memberRecord);
if (node != null) {
if (visitor.visit(node))
node.accept(visitor);
@@ -174,16 +175,13 @@ public class PDOMCPPMemberBlock {
* Returns visibility of the member, or -1 if the given binding is not a member.
*/
public int getVisibility(IBinding member) throws CoreException {
- return getVisibility(this, member);
+ IIndexFragmentBinding indexMember = getPDOM().adaptBinding(member);
+ if (!(indexMember instanceof PDOMNode))
+ return -1;
+ return getVisibility(this, (PDOMNode) indexMember);
}
- private static int getVisibility(PDOMCPPMemberBlock block, IBinding member) throws CoreException {
- if (!(member instanceof PDOMNode))
- return -1;
-
- PDOMNode memberNode = (PDOMNode) member;
- if (memberNode.getPDOM() != block.getPDOM())
- return -1;
+ private static int getVisibility(PDOMCPPMemberBlock block, PDOMNode memberNode) throws CoreException {
long memberRecord = memberNode.getRecord();
do {

Back to the top