diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUnaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUnaryExpression.java index db93cccbd88..4fddf5a49d3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUnaryExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUnaryExpression.java @@ -1,13 +1,14 @@ /******************************************************************************* - * 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 * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * John Camelon (IBM) - Initial API and implementation - * Mike Kucera + * 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 { - /** * op_throw 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 null if + * the operator is not overloaded. + * @since 5.4 + */ + public ICPPFunction getOverload(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java index b8b983c5b38..1b732bb14d0 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java @@ -1,21 +1,24 @@ /******************************************************************************* - * 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 * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * John Camelon (IBM) - Initial API and implementation - * Sergey Prigogin (Google) - * Mike Kucera (IBM) - * Markus Schorn (Wind River Systems) + * John Camelon (IBM) - Initial API and implementation + * Sergey Prigogin (Google) + * Mike Kucera (IBM) + * Markus Schorn (Wind River Systems) *******************************************************************************/ 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,7 +180,8 @@ public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpres } } - public ICPPFunction getOverload() { + @Override + public ICPPFunction getOverload() { if (overload != UNINITIALIZED_FUNCTION) return overload;