mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
d856d9dd76
commit
c186b2070b
6 changed files with 18 additions and 22 deletions
|
@ -266,7 +266,7 @@ public class CPPASTFunctionCallExpression extends ASTNode
|
||||||
|
|
||||||
if (eval instanceof EvalTypeId) {
|
if (eval instanceof EvalTypeId) {
|
||||||
if (!eval.isTypeDependent()) {
|
if (!eval.isTypeDependent()) {
|
||||||
IType t= getNestedType(((EvalTypeId) eval).getInputType(), TDEF|CVTYPE|REF);
|
IType t= getNestedType(((EvalTypeId) eval).getInputType(), TDEF | CVTYPE | REF);
|
||||||
if (t instanceof ICPPClassType && !(t instanceof ICPPUnknownBinding)) {
|
if (t instanceof ICPPClassType && !(t instanceof ICPPUnknownBinding)) {
|
||||||
ICPPClassType cls= (ICPPClassType) t;
|
ICPPClassType cls= (ICPPClassType) t;
|
||||||
LookupData data= CPPSemantics.createLookupData(((IASTIdExpression) functionName).getName());
|
LookupData data= CPPSemantics.createLookupData(((IASTIdExpression) functionName).getName());
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Mike Kucera (IBM) - Initial API and implementation
|
* Mike Kucera (IBM) - Initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
|
||||||
public class CPPASTImplicitName extends CPPASTName implements IASTImplicitName {
|
public class CPPASTImplicitName extends CPPASTName implements IASTImplicitName {
|
||||||
private boolean alternate;
|
private boolean alternate;
|
||||||
private boolean isOperator;
|
private boolean isOperator;
|
||||||
private boolean isDefinition= false;
|
private boolean isDefinition;
|
||||||
|
|
||||||
public CPPASTImplicitName(char[] name, IASTNode parent) {
|
public CPPASTImplicitName(char[] name, IASTNode parent) {
|
||||||
super(name);
|
super(name);
|
||||||
|
|
|
@ -3017,12 +3017,12 @@ public class CPPSemantics {
|
||||||
|
|
||||||
ICPPEvaluation[] args;
|
ICPPEvaluation[] args;
|
||||||
if (placement == null) {
|
if (placement == null) {
|
||||||
args= new ICPPEvaluation[] {arg1, arg2};
|
args= new ICPPEvaluation[] { arg1, arg2 };
|
||||||
} else {
|
} else {
|
||||||
args= new ICPPEvaluation[2+placement.length];
|
args= new ICPPEvaluation[2 + placement.length];
|
||||||
args[0]= arg1;
|
args[0]= arg1;
|
||||||
args[1]= arg2;
|
args[1]= arg2;
|
||||||
int i=2;
|
int i= 2;
|
||||||
for (IASTInitializerClause p : placement) {
|
for (IASTInitializerClause p : placement) {
|
||||||
final ICPPASTInitializerClause arg = (ICPPASTInitializerClause) p;
|
final ICPPASTInitializerClause arg = (ICPPASTInitializerClause) p;
|
||||||
final ICPPEvaluation a = arg.getEvaluation();
|
final ICPPEvaluation a = arg.getEvaluation();
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Bryan Wilkinson (QNX) - Initial API and implementation
|
* Bryan Wilkinson (QNX) - 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;
|
||||||
|
|
||||||
|
@ -40,7 +40,6 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
*/
|
*/
|
||||||
class PDOMCPPClassTemplatePartialSpecialization extends PDOMCPPClassTemplate
|
class PDOMCPPClassTemplatePartialSpecialization extends PDOMCPPClassTemplate
|
||||||
implements IPDOMPartialSpecialization, ICPPSpecialization, IPDOMOverloader {
|
implements IPDOMPartialSpecialization, ICPPSpecialization, IPDOMOverloader {
|
||||||
|
|
||||||
private static final int ARGUMENTS = PDOMCPPClassTemplate.RECORD_SIZE + 0;
|
private static final int ARGUMENTS = PDOMCPPClassTemplate.RECORD_SIZE + 0;
|
||||||
private static final int SIGNATURE_HASH = PDOMCPPClassTemplate.RECORD_SIZE + 4;
|
private static final int SIGNATURE_HASH = PDOMCPPClassTemplate.RECORD_SIZE + 4;
|
||||||
private static final int PRIMARY = PDOMCPPClassTemplate.RECORD_SIZE + 8;
|
private static final int PRIMARY = PDOMCPPClassTemplate.RECORD_SIZE + 8;
|
||||||
|
@ -116,9 +115,9 @@ class PDOMCPPClassTemplatePartialSpecialization extends PDOMCPPClassTemplate
|
||||||
@Override
|
@Override
|
||||||
public void setArguments(ICPPTemplateArgument[] templateArguments) throws CoreException {
|
public void setArguments(ICPPTemplateArgument[] templateArguments) throws CoreException {
|
||||||
final Database db = getPDOM().getDB();
|
final Database db = getPDOM().getDB();
|
||||||
long oldRec = db.getRecPtr(record+ARGUMENTS);
|
long oldRec = db.getRecPtr(record + ARGUMENTS);
|
||||||
long rec= PDOMCPPArgumentList.putArguments(this, templateArguments);
|
long rec= PDOMCPPArgumentList.putArguments(this, templateArguments);
|
||||||
db.putRecPtr(record+ARGUMENTS, rec);
|
db.putRecPtr(record + ARGUMENTS, rec);
|
||||||
if (oldRec != 0) {
|
if (oldRec != 0) {
|
||||||
PDOMCPPArgumentList.clearArguments(this, oldRec);
|
PDOMCPPArgumentList.clearArguments(this, oldRec);
|
||||||
}
|
}
|
||||||
|
@ -127,7 +126,7 @@ class PDOMCPPClassTemplatePartialSpecialization extends PDOMCPPClassTemplate
|
||||||
@Override
|
@Override
|
||||||
public ICPPTemplateArgument[] getTemplateArguments() {
|
public ICPPTemplateArgument[] getTemplateArguments() {
|
||||||
try {
|
try {
|
||||||
final long rec= getPDOM().getDB().getRecPtr(record+ARGUMENTS);
|
final long rec= getPDOM().getDB().getRecPtr(record + ARGUMENTS);
|
||||||
return PDOMCPPArgumentList.getArguments(this, rec);
|
return PDOMCPPArgumentList.getArguments(this, rec);
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CCorePlugin.log(e);
|
CCorePlugin.log(e);
|
||||||
|
@ -144,7 +143,7 @@ class PDOMCPPClassTemplatePartialSpecialization extends PDOMCPPClassTemplate
|
||||||
@Override
|
@Override
|
||||||
public int pdomCompareTo(PDOMBinding other) {
|
public int pdomCompareTo(PDOMBinding other) {
|
||||||
int cmp = super.pdomCompareTo(other);
|
int cmp = super.pdomCompareTo(other);
|
||||||
if(cmp==0) {
|
if(cmp == 0) {
|
||||||
if(other instanceof PDOMCPPClassTemplatePartialSpecialization) {
|
if(other instanceof PDOMCPPClassTemplatePartialSpecialization) {
|
||||||
try {
|
try {
|
||||||
PDOMCPPClassTemplatePartialSpecialization otherSpec = (PDOMCPPClassTemplatePartialSpecialization) other;
|
PDOMCPPClassTemplatePartialSpecialization otherSpec = (PDOMCPPClassTemplatePartialSpecialization) other;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* 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.pdom.dom.cpp;
|
package org.eclipse.cdt.internal.core.pdom.dom.cpp;
|
||||||
|
|
||||||
|
@ -31,7 +31,6 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
*/
|
*/
|
||||||
class PDOMCPPClassTemplatePartialSpecializationSpecialization extends PDOMCPPClassTemplateSpecialization
|
class PDOMCPPClassTemplatePartialSpecializationSpecialization extends PDOMCPPClassTemplateSpecialization
|
||||||
implements IPDOMPartialSpecialization, ICPPClassTemplatePartialSpecializationSpecialization {
|
implements IPDOMPartialSpecialization, ICPPClassTemplatePartialSpecializationSpecialization {
|
||||||
|
|
||||||
private static final int PRIMARY_TEMPLATE = PDOMCPPClassTemplateSpecialization.RECORD_SIZE;
|
private static final int PRIMARY_TEMPLATE = PDOMCPPClassTemplateSpecialization.RECORD_SIZE;
|
||||||
private static final int ARGUMENTS = PDOMCPPClassTemplateSpecialization.RECORD_SIZE+4;
|
private static final int ARGUMENTS = PDOMCPPClassTemplateSpecialization.RECORD_SIZE+4;
|
||||||
private static final int NEXT_PARTIAL = PDOMCPPClassTemplateSpecialization.RECORD_SIZE+8;
|
private static final int NEXT_PARTIAL = PDOMCPPClassTemplateSpecialization.RECORD_SIZE+8;
|
||||||
|
@ -48,7 +47,6 @@ class PDOMCPPClassTemplatePartialSpecializationSpecialization extends PDOMCPPCla
|
||||||
getDB().putRecPtr(record + PRIMARY_TEMPLATE, primary.getRecord());
|
getDB().putRecPtr(record + PRIMARY_TEMPLATE, primary.getRecord());
|
||||||
|
|
||||||
linkage.new ConfigurePartialSpecialization(this, partial);
|
linkage.new ConfigurePartialSpecialization(this, partial);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public PDOMCPPClassTemplatePartialSpecializationSpecialization(PDOMLinkage linkage, long bindingRecord) {
|
public PDOMCPPClassTemplatePartialSpecializationSpecialization(PDOMLinkage linkage, long bindingRecord) {
|
||||||
|
@ -117,9 +115,9 @@ class PDOMCPPClassTemplatePartialSpecializationSpecialization extends PDOMCPPCla
|
||||||
@Override
|
@Override
|
||||||
public void setArguments(ICPPTemplateArgument[] templateArguments) throws CoreException {
|
public void setArguments(ICPPTemplateArgument[] templateArguments) throws CoreException {
|
||||||
final Database db = getPDOM().getDB();
|
final Database db = getPDOM().getDB();
|
||||||
long oldRec = db.getRecPtr(record+ARGUMENTS);
|
long oldRec = db.getRecPtr(record + ARGUMENTS);
|
||||||
long rec= PDOMCPPArgumentList.putArguments(this, templateArguments);
|
long rec= PDOMCPPArgumentList.putArguments(this, templateArguments);
|
||||||
db.putRecPtr(record+ARGUMENTS, rec);
|
db.putRecPtr(record + ARGUMENTS, rec);
|
||||||
if (oldRec != 0) {
|
if (oldRec != 0) {
|
||||||
PDOMCPPArgumentList.clearArguments(this, oldRec);
|
PDOMCPPArgumentList.clearArguments(this, oldRec);
|
||||||
}
|
}
|
||||||
|
@ -128,7 +126,7 @@ class PDOMCPPClassTemplatePartialSpecializationSpecialization extends PDOMCPPCla
|
||||||
@Override
|
@Override
|
||||||
public ICPPTemplateArgument[] getTemplateArguments() {
|
public ICPPTemplateArgument[] getTemplateArguments() {
|
||||||
try {
|
try {
|
||||||
final long rec= getPDOM().getDB().getRecPtr(record+ARGUMENTS);
|
final long rec= getPDOM().getDB().getRecPtr(record + ARGUMENTS);
|
||||||
return PDOMCPPArgumentList.getArguments(this, rec);
|
return PDOMCPPArgumentList.getArguments(this, rec);
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CCorePlugin.log(e);
|
CCorePlugin.log(e);
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Bryan Wilkinson (QNX) - Initial API and implementation
|
* Bryan Wilkinson (QNX) - 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;
|
||||||
|
|
||||||
|
@ -40,7 +40,6 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
*/
|
*/
|
||||||
class PDOMCPPClassTemplateSpecialization extends PDOMCPPClassSpecialization
|
class PDOMCPPClassTemplateSpecialization extends PDOMCPPClassSpecialization
|
||||||
implements ICPPClassTemplate, ICPPInstanceCache {
|
implements ICPPClassTemplate, ICPPInstanceCache {
|
||||||
|
|
||||||
@SuppressWarnings("hiding")
|
@SuppressWarnings("hiding")
|
||||||
protected static final int RECORD_SIZE = PDOMCPPClassSpecialization.RECORD_SIZE;
|
protected static final int RECORD_SIZE = PDOMCPPClassSpecialization.RECORD_SIZE;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue