Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2010-03-19 09:06:51 -0400
committerMarkus Schorn2010-03-19 09:06:51 -0400
commitb01672b1f37bdf0602f513c2f3d5fd85d0755ec3 (patch)
tree0df7a79e99e0fe7b32ea29b890a6618b67cb45dd /lrparser/org.eclipse.cdt.core.lrparser
parent90f7d1a70295c7566d6306cd701bb2ea595e4bf5 (diff)
downloadorg.eclipse.cdt-b01672b1f37bdf0602f513c2f3d5fd85d0755ec3.tar.gz
org.eclipse.cdt-b01672b1f37bdf0602f513c2f3d5fd85d0755ec3.tar.xz
org.eclipse.cdt-b01672b1f37bdf0602f513c2f3d5fd85d0755ec3.zip
Bug 305975: Strongly typed enums, forward declarations for enum.
Diffstat (limited to 'lrparser/org.eclipse.cdt.core.lrparser')
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/old/org/eclipse/cdt/internal/core/dom/lrparser/c99/bindings/C99Enumerator.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/old/org/eclipse/cdt/internal/core/dom/lrparser/c99/bindings/C99Enumerator.java b/lrparser/org.eclipse.cdt.core.lrparser/old/org/eclipse/cdt/internal/core/dom/lrparser/c99/bindings/C99Enumerator.java
index 9a7d676883..6a509d7f00 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/old/org/eclipse/cdt/internal/core/dom/lrparser/c99/bindings/C99Enumerator.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/old/org/eclipse/cdt/internal/core/dom/lrparser/c99/bindings/C99Enumerator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 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
@@ -12,7 +12,6 @@ package org.eclipse.cdt.internal.core.dom.lrparser.c99.bindings;
import org.eclipse.cdt.core.dom.ILinkage;
import org.eclipse.cdt.core.dom.ast.DOMException;
-import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.IEnumerator;
import org.eclipse.cdt.core.dom.ast.IScope;
@@ -20,7 +19,6 @@ import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.IValue;
import org.eclipse.cdt.internal.core.dom.Linkage;
import org.eclipse.cdt.internal.core.dom.parser.Value;
-import org.eclipse.cdt.internal.core.dom.parser.c.CVisitor;
import org.eclipse.core.runtime.PlatformObject;
@SuppressWarnings("restriction")
@@ -71,9 +69,8 @@ public class C99Enumerator extends PlatformObject implements IC99Binding, IEnume
}
public IBinding getOwner() throws DOMException {
- if (scope != null) {
- return CVisitor.findEnclosingFunction((IASTNode) scope.getScopeName()); // local or global
- }
+ if (type instanceof IBinding)
+ return (IBinding) type;
return null;
}

Back to the top