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-03 15:22:22 -07:00
parent 9e2fb6a53a
commit f2a7c68c5f
7 changed files with 26 additions and 29 deletions

View file

@ -6,12 +6,11 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andrew Niefer (IBM Corporation) - initial API and implementation
* Markus Schorn (Wind River Systems)
* Andrew Niefer (IBM Corporation) - initial API and implementation
* Markus Schorn (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast.cpp;
/**
* Interface for class scopes.
*
@ -20,8 +19,7 @@ package org.eclipse.cdt.core.dom.ast.cpp;
*/
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();
@ -30,7 +28,6 @@ public interface ICPPClassScope extends ICPPScope {
* scope. These methods may or may not have been explicitly declared in the
* code. The methods that will be implicitly declared are: the default
* constructor, copy constructor, copy assignment operator, and destructor
*
*/
public ICPPMethod[] getImplicitMethods();

View file

@ -86,18 +86,17 @@ public interface ICPPClassType extends ICompositeType, ICPPBinding {
* Returns an array of ICPPConstructor objects representing the constructors
* for this class. This list includes both declared and implicit
* constructors.
*
*/
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.
*/
public IBinding[] getFriends();
/**
* return an array of nested classes/structures
* Returns an array of nested classes/structures
*/
public ICPPClassType[] getNestedClasses();
}

View file

@ -6,10 +6,10 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andrew Niefer (IBM) - Initial API and implementation
* Markus Schorn (Wind River Systems)
* Bryan Wilkinson (QNX)
* Andrew Ferguson (Symbian)
* Andrew Niefer (IBM) - Initial API and implementation
* Markus Schorn (Wind River Systems)
* Bryan Wilkinson (QNX)
* Andrew Ferguson (Symbian)
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp;

View file

@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Markus Schorn - initial API and implementation
* Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp;

View file

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

View file

@ -10,7 +10,10 @@
*******************************************************************************/
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.HashSet;
@ -80,7 +83,7 @@ class BuiltinOperators {
Object[] globCandidates) {
fFileScope= point.getTranslationUnit().getScope();
fOperator= operator;
fUnary= args.length<2;
fUnary= args.length < 2;
fGlobalCandidates= globCandidates;
if (args.length > 0) {
IType type= args[0].getTypeOrFunctionSet(point);
@ -95,7 +98,6 @@ class BuiltinOperators {
}
}
private ICPPFunction[] create() {
switch (fOperator) {
case ARROW:
@ -231,8 +233,6 @@ class BuiltinOperators {
return fResult.toArray(new ICPPFunction[fResult.size()]);
}
// 13.6-3, 13.6-4, 13.6-5
private void opIncOrDec() {
IType[] types= getClassConversionTypes(FIRST);
@ -424,7 +424,6 @@ class BuiltinOperators {
return p1;
}
// 13.6-13, 13.6.14
private void pointerArithmetic(boolean useRef, boolean isDiff) {
IType[] types= getClassConversionTypes(FIRST);

View file

@ -6,11 +6,10 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Markus Schorn - initial API and implementation
* Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
/**
* Represents the possible cv-qualification of a type.
*/
@ -23,16 +22,19 @@ public enum CVQualifier {
private static final int R = 4;
final private int fQualifiers;
private CVQualifier(int qualifiers) {
fQualifiers= qualifiers;
}
public boolean isConst() {
return (fQualifiers & C) != 0;
}
public boolean isVolatile() {
return (fQualifiers & V) != 0;
}
public boolean isRestrict() {
return (fQualifiers & R) != 0;
}
@ -54,7 +56,7 @@ public enum CVQualifier {
}
private CVQualifier fromQualifier(final int q) {
switch(q) {
switch (q) {
case C|V|R: return CONST_VOLATILE_RESTRICT;
case V|R: return VOLATILE_RESTRICT;
case C|R: return CONST_RESTRICT;
@ -65,7 +67,7 @@ public enum CVQualifier {
case 0: default: return NONE;
}
}
/**
* [3.9.3-4] Implements cv-qualification (partial) comparison. There is a (partial)
* ordering on cv-qualifiers, so that a type can be said to be more
@ -83,12 +85,12 @@ public enum CVQualifier {
* </ul>
*/
public int partialComparison(CVQualifier cv2) {
// same qualifications
// Same qualifications.
if (this == cv2)
return 0;
if (!isAtLeastAsQualifiedAs(cv2))
return -1;
return fQualifiers-cv2.fQualifiers;
return fQualifiers - cv2.fQualifiers;
}
}