mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Cosmetics.
This commit is contained in:
parent
149937682f
commit
06bcfad238
4 changed files with 33 additions and 57 deletions
|
@ -23,15 +23,15 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter;
|
|||
* An example is GCC built-in functions.
|
||||
*/
|
||||
public class CPPImplicitFunction extends CPPFunction {
|
||||
|
||||
private ICPPParameter[] parms=null;
|
||||
private IScope scope=null;
|
||||
private ICPPFunctionType functionType=null;
|
||||
private ICPPParameter[] parms;
|
||||
private IScope scope;
|
||||
private ICPPFunctionType functionType;
|
||||
private final boolean takesVarArgs;
|
||||
private boolean isDeleted;
|
||||
private final char[] name;
|
||||
|
||||
public CPPImplicitFunction(char[] name, IScope scope, ICPPFunctionType type, ICPPParameter[] parms, boolean takesVarArgs) {
|
||||
public CPPImplicitFunction(char[] name, IScope scope, ICPPFunctionType type,
|
||||
ICPPParameter[] parms, boolean takesVarArgs) {
|
||||
super(null);
|
||||
this.name= name;
|
||||
this.scope= scope;
|
||||
|
@ -55,24 +55,16 @@ public class CPPImplicitFunction extends CPPFunction {
|
|||
return String.valueOf(name);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
|
||||
*/
|
||||
@Override
|
||||
public char[] getNameCharArray() {
|
||||
return name;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
|
||||
*/
|
||||
|
||||
@Override
|
||||
public IScope getScope() {
|
||||
return scope;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.IFunction#getFunctionScope()
|
||||
*/
|
||||
@Override
|
||||
public IScope getFunctionScope() {
|
||||
return null;
|
||||
|
|
|
@ -64,11 +64,12 @@ public class CPPImplicitMethod extends CPPImplicitFunction implements ICPPMethod
|
|||
IASTDeclaration[] members = cls.getMembers();
|
||||
ICPPASTVisibilityLabel vis = null;
|
||||
for (IASTDeclaration member : members) {
|
||||
if( member instanceof ICPPASTVisibilityLabel )
|
||||
if (member instanceof ICPPASTVisibilityLabel) {
|
||||
vis = (ICPPASTVisibilityLabel) member;
|
||||
else if( member == decl )
|
||||
} else if (member == decl) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (vis != null) {
|
||||
return vis.getVisibility();
|
||||
} else if (cls.getKey() == ICPPASTCompositeTypeSpecifier.k_class) {
|
||||
|
|
|
@ -142,9 +142,6 @@ public class CPPMethod extends CPPFunction implements ICPPMethod {
|
|||
return CPPVisitor.getContainingScope(getASTName());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod#isVirtual()
|
||||
*/
|
||||
@Override
|
||||
public boolean isVirtual() {
|
||||
IASTDeclaration decl = getPrimaryDeclaration();
|
||||
|
@ -167,9 +164,6 @@ public class CPPMethod extends CPPFunction implements ICPPMethod {
|
|||
return declSpec;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction#isInline()
|
||||
*/
|
||||
@Override
|
||||
public boolean isInline() {
|
||||
IASTDeclaration decl = getPrimaryDeclaration();
|
||||
|
@ -182,9 +176,6 @@ public class CPPMethod extends CPPFunction implements ICPPMethod {
|
|||
return declSpec.isInline();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction#isMutable()
|
||||
*/
|
||||
@Override
|
||||
public boolean isMutable() {
|
||||
return hasStorageClass(this, IASTDeclSpecifier.sc_mutable);
|
||||
|
@ -202,9 +193,6 @@ public class CPPMethod extends CPPFunction implements ICPPMethod {
|
|||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod#isDestructor()
|
||||
*/
|
||||
@Override
|
||||
public boolean isDestructor() {
|
||||
char[] name = getNameCharArray();
|
||||
|
@ -219,9 +207,6 @@ public class CPPMethod extends CPPFunction implements ICPPMethod {
|
|||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod#isPureVirtual()
|
||||
*/
|
||||
@Override
|
||||
public boolean isPureVirtual() {
|
||||
ICPPASTFunctionDeclarator declarator = findFunctionDeclarator();
|
||||
|
|
|
@ -12,9 +12,6 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.pdom.dom;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
|
@ -40,6 +37,9 @@ import org.eclipse.cdt.internal.core.pdom.db.IString;
|
|||
import org.eclipse.cdt.internal.core.pdom.tag.PDOMTaggable;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
|
||||
/**
|
||||
* Base class for bindings in the PDOM.
|
||||
*/
|
||||
|
@ -255,11 +255,9 @@ public abstract class PDOMBinding extends PDOMNamedNode implements IPDOMBinding
|
|||
}
|
||||
|
||||
@Override
|
||||
abstract protected int getRecordSize(); // superclass's implementation is no longer valid
|
||||
abstract protected int getRecordSize(); // Superclass's implementation is no longer valid
|
||||
|
||||
/* For debug purposes only.
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
/** For debug purposes only. */
|
||||
@Override
|
||||
public final String toString() {
|
||||
String name = toStringBase();
|
||||
|
@ -300,9 +298,9 @@ public abstract class PDOMBinding extends PDOMNamedNode implements IPDOMBinding
|
|||
return field.getName();
|
||||
}
|
||||
}
|
||||
} catch (IllegalAccessException iae) {
|
||||
} catch (IllegalAccessException e) {
|
||||
continue;
|
||||
} catch (IllegalArgumentException iae) {
|
||||
} catch (IllegalArgumentException e) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue