mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
9e2fb6a53a
commit
f2a7c68c5f
7 changed files with 26 additions and 29 deletions
|
@ -11,7 +11,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for class scopes.
|
* Interface for class scopes.
|
||||||
*
|
*
|
||||||
|
@ -20,8 +19,7 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
||||||
*/
|
*/
|
||||||
public interface ICPPClassScope extends ICPPScope {
|
public interface ICPPClassScope extends ICPPScope {
|
||||||
/**
|
/**
|
||||||
* Get the binding for the class this scope is associated with
|
* Returns the binding for the class this scope is associated with.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
ICPPClassType getClassType();
|
ICPPClassType getClassType();
|
||||||
|
|
||||||
|
@ -30,7 +28,6 @@ public interface ICPPClassScope extends ICPPScope {
|
||||||
* scope. These methods may or may not have been explicitly declared in the
|
* scope. These methods may or may not have been explicitly declared in the
|
||||||
* code. The methods that will be implicitly declared are: the default
|
* code. The methods that will be implicitly declared are: the default
|
||||||
* constructor, copy constructor, copy assignment operator, and destructor
|
* constructor, copy constructor, copy assignment operator, and destructor
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public ICPPMethod[] getImplicitMethods();
|
public ICPPMethod[] getImplicitMethods();
|
||||||
|
|
||||||
|
|
|
@ -86,18 +86,17 @@ public interface ICPPClassType extends ICompositeType, ICPPBinding {
|
||||||
* Returns an array of ICPPConstructor objects representing the constructors
|
* Returns an array of ICPPConstructor objects representing the constructors
|
||||||
* for this class. This list includes both declared and implicit
|
* for this class. This list includes both declared and implicit
|
||||||
* constructors.
|
* constructors.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public ICPPConstructor[] getConstructors();
|
public ICPPConstructor[] getConstructors();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return an array of bindings for those classes/functions declared as
|
* Returns an array of bindings for those classes/functions declared as
|
||||||
* friends of this class.
|
* friends of this class.
|
||||||
*/
|
*/
|
||||||
public IBinding[] getFriends();
|
public IBinding[] getFriends();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return an array of nested classes/structures
|
* Returns an array of nested classes/structures
|
||||||
*/
|
*/
|
||||||
public ICPPClassType[] getNestedClasses();
|
public ICPPClassType[] getNestedClasses();
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,10 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.*;
|
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.ALLCVQ;
|
||||||
|
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.CVTYPE;
|
||||||
|
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.REF;
|
||||||
|
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.TDEF;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -95,7 +98,6 @@ class BuiltinOperators {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private ICPPFunction[] create() {
|
private ICPPFunction[] create() {
|
||||||
switch (fOperator) {
|
switch (fOperator) {
|
||||||
case ARROW:
|
case ARROW:
|
||||||
|
@ -231,8 +233,6 @@ class BuiltinOperators {
|
||||||
return fResult.toArray(new ICPPFunction[fResult.size()]);
|
return fResult.toArray(new ICPPFunction[fResult.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 13.6-3, 13.6-4, 13.6-5
|
// 13.6-3, 13.6-4, 13.6-5
|
||||||
private void opIncOrDec() {
|
private void opIncOrDec() {
|
||||||
IType[] types= getClassConversionTypes(FIRST);
|
IType[] types= getClassConversionTypes(FIRST);
|
||||||
|
@ -424,7 +424,6 @@ class BuiltinOperators {
|
||||||
return p1;
|
return p1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 13.6-13, 13.6.14
|
// 13.6-13, 13.6.14
|
||||||
private void pointerArithmetic(boolean useRef, boolean isDiff) {
|
private void pointerArithmetic(boolean useRef, boolean isDiff) {
|
||||||
IType[] types= getClassConversionTypes(FIRST);
|
IType[] types= getClassConversionTypes(FIRST);
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the possible cv-qualification of a type.
|
* Represents the possible cv-qualification of a type.
|
||||||
*/
|
*/
|
||||||
|
@ -23,6 +22,7 @@ public enum CVQualifier {
|
||||||
private static final int R = 4;
|
private static final int R = 4;
|
||||||
|
|
||||||
final private int fQualifiers;
|
final private int fQualifiers;
|
||||||
|
|
||||||
private CVQualifier(int qualifiers) {
|
private CVQualifier(int qualifiers) {
|
||||||
fQualifiers= qualifiers;
|
fQualifiers= qualifiers;
|
||||||
}
|
}
|
||||||
|
@ -30,9 +30,11 @@ public enum CVQualifier {
|
||||||
public boolean isConst() {
|
public boolean isConst() {
|
||||||
return (fQualifiers & C) != 0;
|
return (fQualifiers & C) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isVolatile() {
|
public boolean isVolatile() {
|
||||||
return (fQualifiers & V) != 0;
|
return (fQualifiers & V) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isRestrict() {
|
public boolean isRestrict() {
|
||||||
return (fQualifiers & R) != 0;
|
return (fQualifiers & R) != 0;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +85,7 @@ public enum CVQualifier {
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
public int partialComparison(CVQualifier cv2) {
|
public int partialComparison(CVQualifier cv2) {
|
||||||
// same qualifications
|
// Same qualifications.
|
||||||
if (this == cv2)
|
if (this == cv2)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue