1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-12 10:45:37 +02:00

Added getOverload method.

This commit is contained in:
Sergey Prigogin 2012-02-22 10:46:58 -08:00
parent dc6bc55815
commit 948494892a
2 changed files with 22 additions and 11 deletions

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2004, 2011 IBM Corporation and others.
* Copyright (c) 2004, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -8,6 +8,7 @@
* Contributors:
* John Camelon (IBM) - Initial API and implementation
* Mike Kucera
* Sergey Prigogin (Google)
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast.cpp;
@ -19,7 +20,6 @@ import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICPPASTUnaryExpression extends IASTUnaryExpression, IASTImplicitNameOwner {
/**
* <code>op_throw</code> throw exp
*/
@ -47,4 +47,11 @@ public interface ICPPASTUnaryExpression extends IASTUnaryExpression, IASTImplici
*/
@Override
public ICPPASTUnaryExpression copy(CopyStyle style);
/**
* Returns the function binding for the overloaded operator, or <code>null</code> if
* the operator is not overloaded.
* @since 5.4
*/
public ICPPFunction getOverload();
}

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2004, 2011 IBM Corporation and others.
* Copyright (c) 2004, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying masterials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -15,7 +15,10 @@ package org.eclipse.cdt.internal.core.dom.parser.cpp;
import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.LVALUE;
import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.PRVALUE;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExpressionTypes.*;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExpressionTypes.glvalueType;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExpressionTypes.prvalueType;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExpressionTypes.typeFromFunctionCall;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExpressionTypes.valueCategoryFromFunctionCall;
import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.getUltimateTypeUptoPointers;
import org.eclipse.cdt.core.dom.ast.ASTVisitor;
@ -177,6 +180,7 @@ public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpres
}
}
@Override
public ICPPFunction getOverload() {
if (overload != UNINITIALIZED_FUNCTION)
return overload;