1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2012-08-04 18:13:00 -07:00
parent e932abc78a
commit 58e4809932
8 changed files with 56 additions and 61 deletions

View file

@ -211,7 +211,7 @@ public class CPPBasicType implements ICPPBasicType, ISerializableType {
int modifiers= 0; int modifiers= 0;
int kind; int kind;
if (dense) { if (dense) {
kind= (firstByte & (ITypeMarshalBuffer.FLAG4-1))/ITypeMarshalBuffer.FLAG1; kind= (firstByte & (ITypeMarshalBuffer.FLAG4 - 1)) / ITypeMarshalBuffer.FLAG1;
} else { } else {
kind= buffer.getByte(); kind= buffer.getByte();
modifiers= buffer.getByte(); modifiers= buffer.getByte();

View file

@ -796,12 +796,13 @@ public class CPPTemplates {
IType[] exceptionSpecs= instantiateTypes(func.getExceptionSpecification(), tpMap, -1, within, point); IType[] exceptionSpecs= instantiateTypes(func.getExceptionSpecification(), tpMap, -1, within, point);
if (decl instanceof ICPPFunctionTemplate) { if (decl instanceof ICPPFunctionTemplate) {
if (decl instanceof ICPPConstructor) if (decl instanceof ICPPConstructor) {
spec = new CPPConstructorTemplateSpecialization((ICPPConstructor) decl, owner, tpMap, type, exceptionSpecs); spec = new CPPConstructorTemplateSpecialization((ICPPConstructor) decl, owner, tpMap, type, exceptionSpecs);
else if (decl instanceof ICPPMethod) } else if (decl instanceof ICPPMethod) {
spec = new CPPMethodTemplateSpecialization((ICPPMethod) decl, owner, tpMap, type, exceptionSpecs); spec = new CPPMethodTemplateSpecialization((ICPPMethod) decl, owner, tpMap, type, exceptionSpecs);
else } else {
spec = new CPPFunctionTemplateSpecialization((ICPPFunctionTemplate) decl, owner, tpMap, type, exceptionSpecs); spec = new CPPFunctionTemplateSpecialization((ICPPFunctionTemplate) decl, owner, tpMap, type, exceptionSpecs);
}
} else if (decl instanceof ICPPConstructor) { } else if (decl instanceof ICPPConstructor) {
spec = new CPPConstructorSpecialization((ICPPConstructor) decl, owner, tpMap, type, exceptionSpecs); spec = new CPPConstructorSpecialization((ICPPConstructor) decl, owner, tpMap, type, exceptionSpecs);
} else if (decl instanceof ICPPMethod) { } else if (decl instanceof ICPPMethod) {
@ -1265,11 +1266,11 @@ public class CPPTemplates {
} }
/** /**
* Checks whether a given name corresponds to a template declaration and returns the ast node for it. * Checks whether a given name corresponds to a template declaration and returns the AST node
* This works for the name of a template-definition and also for a name needed to qualify a member * for it. This works for the name of a template-definition and also for a name needed to
* definition: * qualify a member definition:
* <pre> * <pre>
* template &lttypename T&gt void MyTemplate&ltT&gt::member() {} * template &lt;typename T&gt; void MyTemplate&ltT&gt;::member() {}
* </pre> * </pre>
* @param name a name for which the corresponding template declaration is searched for. * @param name a name for which the corresponding template declaration is searched for.
* @return the template declaration or <code>null</code> if <code>name</code> does not * @return the template declaration or <code>null</code> if <code>name</code> does not
@ -1614,10 +1615,11 @@ public class CPPTemplates {
name = dtor.getName(); name = dtor.getName();
} else if (simple.getDeclarators().length == 0) { } else if (simple.getDeclarators().length == 0) {
IASTDeclSpecifier spec = simple.getDeclSpecifier(); IASTDeclSpecifier spec = simple.getDeclSpecifier();
if (spec instanceof ICPPASTCompositeTypeSpecifier) if (spec instanceof ICPPASTCompositeTypeSpecifier) {
name = ((ICPPASTCompositeTypeSpecifier) spec).getName(); name = ((ICPPASTCompositeTypeSpecifier) spec).getName();
else if (spec instanceof ICPPASTElaboratedTypeSpecifier) } else if (spec instanceof ICPPASTElaboratedTypeSpecifier) {
name = ((ICPPASTElaboratedTypeSpecifier) spec).getName(); name = ((ICPPASTElaboratedTypeSpecifier) spec).getName();
}
} }
} else if (nestedDecl instanceof IASTFunctionDefinition) { } else if (nestedDecl instanceof IASTFunctionDefinition) {
IASTDeclarator declarator = ((IASTFunctionDefinition) nestedDecl).getDeclarator(); IASTDeclarator declarator = ((IASTFunctionDefinition) nestedDecl).getDeclarator();
@ -1633,11 +1635,10 @@ public class CPPTemplates {
if (currDecl == templateDecl) { if (currDecl == templateDecl) {
return ns[j]; return ns[j];
} }
if (currDecl instanceof ICPPASTTemplateDeclaration) { if (!(currDecl instanceof ICPPASTTemplateDeclaration)) {
currDecl = ((ICPPASTTemplateDeclaration) currDecl).getDeclaration();
} else {
return null; return null;
} }
currDecl = ((ICPPASTTemplateDeclaration) currDecl).getDeclaration();
} }
} }
} else { } else {
@ -2361,7 +2362,7 @@ public class CPPTemplates {
public static boolean containsDependentArg(ObjectMap tpMap) { public static boolean containsDependentArg(ObjectMap tpMap) {
for (Object arg : tpMap.valueArray()) { for (Object arg : tpMap.valueArray()) {
if (isDependentType((IType)arg)) if (isDependentType((IType) arg))
return true; return true;
} }
return false; return false;
@ -2395,9 +2396,9 @@ public class CPPTemplates {
} }
} else if (!t.equals(owner)) { } else if (!t.equals(owner)) {
if (unknown instanceof ICPPUnknownClassType) { if (unknown instanceof ICPPUnknownClassType) {
result= new CPPUnknownClass((ICPPUnknownBinding)t, unknown.getNameCharArray()); result= new CPPUnknownClass((ICPPUnknownBinding) t, unknown.getNameCharArray());
} else if (unknown instanceof IFunction) { } else if (unknown instanceof IFunction) {
result= new CPPUnknownClass((ICPPUnknownBinding)t, unknown.getNameCharArray()); result= new CPPUnknownClass((ICPPUnknownBinding) t, unknown.getNameCharArray());
} else { } else {
result= new CPPUnknownBinding((ICPPUnknownBinding) t, unknown.getNameCharArray()); result= new CPPUnknownBinding((ICPPUnknownBinding) t, unknown.getNameCharArray());
} }

View file

@ -6,9 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Markus Schorn - initial API and implementation * Markus Schorn - initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.index; package org.eclipse.cdt.internal.core.index;
import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.IType;
@ -18,5 +17,4 @@ import org.eclipse.cdt.core.dom.ast.IType;
* @since 4.0 * @since 4.0
*/ */
public interface IIndexType extends IType { public interface IIndexType extends IType {
} }

View file

@ -57,13 +57,13 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
ICPPClassSpecialization, IPDOMMemberOwner, IPDOMCPPClassType { ICPPClassSpecialization, IPDOMMemberOwner, IPDOMCPPClassType {
private static final int FIRST_BASE = PDOMCPPSpecialization.RECORD_SIZE + 0; private static final int FIRST_BASE = PDOMCPPSpecialization.RECORD_SIZE + 0;
private static final int MEMBER_LIST = PDOMCPPSpecialization.RECORD_SIZE + 4; private static final int MEMBER_LIST = PDOMCPPSpecialization.RECORD_SIZE + 4;
/** /**
* The size in bytes of a PDOMCPPClassSpecialization record in the database. * The size in bytes of a PDOMCPPClassSpecialization record in the database.
*/ */
@SuppressWarnings("hiding") @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPSpecialization.RECORD_SIZE + 8; protected static final int RECORD_SIZE = PDOMCPPSpecialization.RECORD_SIZE + 8;
private volatile ICPPClassScope fScope; private volatile ICPPClassScope fScope;
private ObjectMap specializationMap; // Obtained from the synchronized PDOM cache private ObjectMap specializationMap; // Obtained from the synchronized PDOM cache
private final ThreadLocal<Set<IBinding>> fInProgress= new ThreadLocal<Set<IBinding>>(); private final ThreadLocal<Set<IBinding>> fInProgress= new ThreadLocal<Set<IBinding>>();
@ -76,7 +76,7 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
public PDOMCPPClassSpecialization(PDOMLinkage linkage, long bindingRecord) { public PDOMCPPClassSpecialization(PDOMLinkage linkage, long bindingRecord) {
super(linkage, bindingRecord); super(linkage, bindingRecord);
} }
@Override @Override
protected int getRecordSize() { protected int getRecordSize() {
return RECORD_SIZE; return RECORD_SIZE;
@ -91,14 +91,14 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
public ICPPClassType getSpecializedBinding() { public ICPPClassType getSpecializedBinding() {
return (ICPPClassType) super.getSpecializedBinding(); return (ICPPClassType) super.getSpecializedBinding();
} }
@Override @Override
public IBinding specializeMember(IBinding original) { public IBinding specializeMember(IBinding original) {
return specializeMember(original, null); return specializeMember(original, null);
} }
@Override @Override
public IBinding specializeMember(IBinding original, IASTNode point) { public IBinding specializeMember(IBinding original, IASTNode point) {
if (specializationMap == null) { if (specializationMap == null) {
final Long key= record+PDOMCPPLinkage.CACHE_INSTANCE_SCOPE; final Long key= record+PDOMCPPLinkage.CACHE_INSTANCE_SCOPE;
Object cached= getPDOM().getCachedResult(key); Object cached= getPDOM().getCachedResult(key);
@ -124,14 +124,14 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
Set<IBinding> set; Set<IBinding> set;
synchronized (specializationMap) { synchronized (specializationMap) {
IBinding result= (IBinding) specializationMap.get(original); IBinding result= (IBinding) specializationMap.get(original);
if (result != null) if (result != null)
return result; return result;
set= fInProgress.get(); set= fInProgress.get();
if (set == null) { if (set == null) {
set= new HashSet<IBinding>(); set= new HashSet<IBinding>();
fInProgress.set(set); fInProgress.set(set);
} }
if (!set.add(original)) if (!set.add(original))
return new RecursionResolvingBinding(null, null); return new RecursionResolvingBinding(null, null);
} }
IBinding newSpec= CPPTemplates.createSpecialization(this, original, point); IBinding newSpec= CPPTemplates.createSpecialization(this, original, point);
@ -154,7 +154,7 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
if (hasOwnScope()) { if (hasOwnScope()) {
fScope= new PDOMCPPClassScope(this); fScope= new PDOMCPPClassScope(this);
return fScope; return fScope;
} }
} catch (CoreException e) { } catch (CoreException e) {
} }
fScope= new PDOMCPPClassSpecializationScope(this); fScope= new PDOMCPPClassSpecializationScope(this);
@ -175,14 +175,14 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
long rec = base != null ? base.getRecord() : 0; long rec = base != null ? base.getRecord() : 0;
getDB().putRecPtr(record + FIRST_BASE, rec); getDB().putRecPtr(record + FIRST_BASE, rec);
} }
public void addBase(PDOMCPPBase base) throws CoreException { public void addBase(PDOMCPPBase base) throws CoreException {
getPDOM().removeCachedResult(record+PDOMCPPLinkage.CACHE_BASES); getPDOM().removeCachedResult(record+PDOMCPPLinkage.CACHE_BASES);
PDOMCPPBase firstBase = getFirstBase(); PDOMCPPBase firstBase = getFirstBase();
base.setNextBase(firstBase); base.setNextBase(firstBase);
setFirstBase(base); setFirstBase(base);
} }
public void removeBase(PDOMName pdomName) throws CoreException { public void removeBase(PDOMName pdomName) throws CoreException {
getPDOM().removeCachedResult(record+PDOMCPPLinkage.CACHE_BASES); getPDOM().removeCachedResult(record+PDOMCPPLinkage.CACHE_BASES);
PDOMCPPBase base= getFirstBase(); PDOMCPPBase base= getFirstBase();
@ -205,7 +205,7 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
base.delete(); base.delete();
} }
} }
@Override @Override
public ICPPBase[] getBases() { public ICPPBase[] getBases() {
return getBases(null); return getBases(null);
@ -217,11 +217,11 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
if (scope instanceof ICPPClassSpecializationScope) { if (scope instanceof ICPPClassSpecializationScope) {
return ((ICPPClassSpecializationScope) scope).getBases(point); return ((ICPPClassSpecializationScope) scope).getBases(point);
} }
// This is an explicit specialization // This is an explicit specialization
Long key= record + PDOMCPPLinkage.CACHE_BASES; Long key= record + PDOMCPPLinkage.CACHE_BASES;
ICPPBase[] bases= (ICPPBase[]) getPDOM().getCachedResult(key); ICPPBase[] bases= (ICPPBase[]) getPDOM().getCachedResult(key);
if (bases != null) if (bases != null)
return bases; return bases;
try { try {
@ -238,7 +238,7 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
} }
return ICPPBase.EMPTY_BASE_ARRAY; return ICPPBase.EMPTY_BASE_ARRAY;
} }
@Override @Override
public ICPPConstructor[] getConstructors() { public ICPPConstructor[] getConstructors() {
return getConstructors(null); return getConstructors(null);
@ -291,7 +291,7 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
IScope scope= getCompositeScope(); IScope scope= getCompositeScope();
if (scope instanceof ICPPClassSpecializationScope) { if (scope instanceof ICPPClassSpecializationScope) {
return ((ICPPClassSpecializationScope) scope).getDeclaredFields(point); return ((ICPPClassSpecializationScope) scope).getDeclaredFields(point);
} }
try { try {
PDOMClassUtil.FieldCollector visitor = new PDOMClassUtil.FieldCollector(); PDOMClassUtil.FieldCollector visitor = new PDOMClassUtil.FieldCollector();
PDOMCPPClassScope.acceptViaCache(this, visitor, false); PDOMCPPClassScope.acceptViaCache(this, visitor, false);
@ -301,18 +301,18 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
return ICPPField.EMPTY_CPPFIELD_ARRAY; return ICPPField.EMPTY_CPPFIELD_ARRAY;
} }
} }
@Override @Override
public ICPPClassType[] getNestedClasses() { public ICPPClassType[] getNestedClasses() {
return getNestedClasses(null); return getNestedClasses(null);
} }
@Override @Override
public ICPPClassType[] getNestedClasses(IASTNode point) { public ICPPClassType[] getNestedClasses(IASTNode point) {
IScope scope= getCompositeScope(); IScope scope= getCompositeScope();
if (scope instanceof ICPPClassSpecializationScope) { if (scope instanceof ICPPClassSpecializationScope) {
return ((ICPPClassSpecializationScope) scope).getNestedClasses(point); return ((ICPPClassSpecializationScope) scope).getNestedClasses(point);
} }
try { try {
PDOMClassUtil.NestedClassCollector visitor = new PDOMClassUtil.NestedClassCollector(); PDOMClassUtil.NestedClassCollector visitor = new PDOMClassUtil.NestedClassCollector();
PDOMCPPClassScope.acceptViaCache(this, visitor, false); PDOMCPPClassScope.acceptViaCache(this, visitor, false);
@ -335,7 +335,7 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
} }
@Override @Override
public ICPPMethod[] getMethods() { public ICPPMethod[] getMethods() {
return ClassTypeHelper.getMethods(this); return ClassTypeHelper.getMethods(this);
} }
@ -343,12 +343,12 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
public ICPPMethod[] getAllDeclaredMethods() { public ICPPMethod[] getAllDeclaredMethods() {
return ClassTypeHelper.getAllDeclaredMethods(this); return ClassTypeHelper.getAllDeclaredMethods(this);
} }
@Override @Override
public IField[] getFields() { public IField[] getFields() {
return ClassTypeHelper.getFields(this); return ClassTypeHelper.getFields(this);
} }
@Override @Override
public IField findField(String name) { public IField findField(String name) {
return ClassTypeHelper.findField(this, name); return ClassTypeHelper.findField(this, name);
@ -380,7 +380,7 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
return CPPClassSpecialization.isSameClassSpecialization(this, (ICPPClassSpecialization) type); return CPPClassSpecialization.isSameClassSpecialization(this, (ICPPClassSpecialization) type);
} }
@Override @Override
public Object clone() { public Object clone() {
try { try {
@ -406,7 +406,7 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
public void accept(IPDOMVisitor visitor) throws CoreException { public void accept(IPDOMVisitor visitor) throws CoreException {
PDOMCPPClassScope.acceptViaCache(this, visitor, false); PDOMCPPClassScope.acceptViaCache(this, visitor, false);
} }
@Override @Override
public boolean isAnonymous() { public boolean isAnonymous() {
return false; return false;

View file

@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Markus Schorn (Wind River Systems) - initial API and implementation * Markus Schorn (Wind River Systems) - initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.pdom.dom.cpp; package org.eclipse.cdt.internal.core.pdom.dom.cpp;
@ -24,7 +24,6 @@ import org.eclipse.core.runtime.CoreException;
* serves as a base for unknown types. * serves as a base for unknown types.
*/ */
class PDOMCPPUnknownBinding extends PDOMCPPBinding implements ICPPUnknownBinding { class PDOMCPPUnknownBinding extends PDOMCPPBinding implements ICPPUnknownBinding {
@SuppressWarnings("hiding") @SuppressWarnings("hiding")
protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE; protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE;

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Sergey Prigogin (Google) - initial API and implementation * Sergey Prigogin (Google) - initial API and implementation
* Markus Schorn (Wind River Systems) * Markus Schorn (Wind River Systems)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.pdom.dom.cpp; package org.eclipse.cdt.internal.core.pdom.dom.cpp;
@ -31,7 +31,6 @@ import org.eclipse.core.runtime.CoreException;
* @author Sergey Prigogin * @author Sergey Prigogin
*/ */
class PDOMCPPUnknownClassInstance extends PDOMCPPUnknownClassType implements ICPPUnknownClassInstance, IPDOMOverloader { class PDOMCPPUnknownClassInstance extends PDOMCPPUnknownClassType implements ICPPUnknownClassInstance, IPDOMOverloader {
private static final int ARGUMENTS = PDOMCPPUnknownClassType.RECORD_SIZE + 0; private static final int ARGUMENTS = PDOMCPPUnknownClassType.RECORD_SIZE + 0;
private static final int SIGNATURE_HASH = ARGUMENTS + 4; private static final int SIGNATURE_HASH = ARGUMENTS + 4;
@ -54,7 +53,6 @@ class PDOMCPPUnknownClassInstance extends PDOMCPPUnknownClassType implements ICP
db.putInt(record + SIGNATURE_HASH, sigHash != null ? sigHash.intValue() : 0); db.putInt(record + SIGNATURE_HASH, sigHash != null ? sigHash.intValue() : 0);
} catch (DOMException e) { } catch (DOMException e) {
} }
} }
public PDOMCPPUnknownClassInstance(PDOMLinkage linkage, long bindingRecord) { public PDOMCPPUnknownClassInstance(PDOMLinkage linkage, long bindingRecord) {
@ -80,7 +78,7 @@ class PDOMCPPUnknownClassInstance extends PDOMCPPUnknownClassType implements ICP
public ICPPTemplateArgument[] getArguments() { public ICPPTemplateArgument[] getArguments() {
if (arguments == null) { if (arguments == null) {
try { try {
final long rec= getPDOM().getDB().getRecPtr(record+ARGUMENTS); final long rec= getPDOM().getDB().getRecPtr(record + ARGUMENTS);
arguments= PDOMCPPArgumentList.getArguments(this, rec); arguments= PDOMCPPArgumentList.getArguments(this, rec);
} catch (CoreException e) { } catch (CoreException e) {
CCorePlugin.log(e); CCorePlugin.log(e);

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Sergey Prigogin (Google) - initial API and implementation * Sergey Prigogin (Google) - initial API and implementation
* Markus Schorn (Wind River Systems) * Markus Schorn (Wind River Systems)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.pdom.dom.cpp; package org.eclipse.cdt.internal.core.pdom.dom.cpp;
@ -45,9 +45,8 @@ import org.eclipse.core.runtime.CoreException;
/** /**
* @author Sergey Prigogin * @author Sergey Prigogin
*/ */
class PDOMCPPUnknownClassType extends PDOMCPPUnknownBinding implements ICPPClassScope, ICPPUnknownClassType, class PDOMCPPUnknownClassType extends PDOMCPPUnknownBinding
IPDOMMemberOwner, IIndexType, IIndexScope { implements ICPPClassScope, ICPPUnknownClassType, IPDOMMemberOwner, IIndexType, IIndexScope {
private static final int KEY = PDOMCPPBinding.RECORD_SIZE + 0; // byte private static final int KEY = PDOMCPPBinding.RECORD_SIZE + 0; // byte
private static final int MEMBERLIST = PDOMCPPBinding.RECORD_SIZE + 4; private static final int MEMBERLIST = PDOMCPPBinding.RECORD_SIZE + 4;
@SuppressWarnings("hiding") @SuppressWarnings("hiding")
@ -59,7 +58,7 @@ class PDOMCPPUnknownClassType extends PDOMCPPUnknownBinding implements ICPPClass
super(linkage, parent, classType); super(linkage, parent, classType);
setKind(classType); setKind(classType);
// linked list is initialized by storage being zero'd by malloc // Linked list is initialized by storage being zero'd by malloc
} }
public PDOMCPPUnknownClassType(PDOMLinkage linkage, long bindingRecord) { public PDOMCPPUnknownClassType(PDOMLinkage linkage, long bindingRecord) {
@ -245,7 +244,7 @@ class PDOMCPPUnknownClassType extends PDOMCPPUnknownBinding implements ICPPClass
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.IType#isSameType(org.eclipse.cdt.core.dom.ast.IType) * @see IType#isSameType(IType)
*/ */
@Override @Override
public boolean isSameType(IType type) { public boolean isSameType(IType type) {
@ -263,8 +262,8 @@ class PDOMCPPUnknownClassType extends PDOMCPPUnknownBinding implements ICPPClass
} }
if (type instanceof ICPPUnknownClassType if (type instanceof ICPPUnknownClassType
&& type instanceof ICPPUnknownClassInstance == false && !(type instanceof ICPPUnknownClassInstance)
&& type instanceof ICPPDeferredClassInstance == false) { && !(type instanceof ICPPDeferredClassInstance)) {
ICPPUnknownClassType rhs= (ICPPUnknownClassType) type; ICPPUnknownClassType rhs= (ICPPUnknownClassType) type;
if (CharArrayUtils.equals(getNameCharArray(), rhs.getNameCharArray())) { if (CharArrayUtils.equals(getNameCharArray(), rhs.getNameCharArray())) {
final IBinding lhsContainer = getOwner(); final IBinding lhsContainer = getOwner();

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Markus Schorn - initial API and implementation * Markus Schorn - initial API and implementation
* Sergey Prigogin (Google) * Sergey Prigogin (Google)
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.pdom.dom.cpp; package org.eclipse.cdt.internal.core.pdom.dom.cpp;