Package org.eclipse.cdt.core.dom.ast
Interface IFunction
-
- All Superinterfaces:
org.eclipse.core.runtime.IAdaptable
,IBinding
- All Known Subinterfaces:
ICPPConstructor
,ICPPConstructorSpecialization
,ICPPDeferredFunction
,ICPPFunction
,ICPPFunctionInstance
,ICPPFunctionSpecialization
,ICPPFunctionTemplate
,ICPPMethod
,ICPPMethodSpecialization
public interface IFunction extends IBinding
This represents a function in the program. A function is also a scope for other bindings.- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IBinding
EMPTY_BINDING_ARRAY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IScope
getFunctionScope()
Returns the function scopeIParameter[]
getParameters()
Returns the formal parameters of the function.IFunctionType
getType()
Returns the IFunctionType for this functionboolean
isAuto()
boolean
isExtern()
boolean
isInline()
Returnstrue
if the function is inline.boolean
isNoDiscard()
Returnstrue
if return value of this function must not be discarded.boolean
isNoReturn()
Returnstrue
if this function never returns.boolean
isRegister()
boolean
isStatic()
Returnstrue
if the function has the static storage-class specifier similarly for extern, auto, register.boolean
takesVarArgs()
Returnstrue
if this function takes variable arguments.-
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IBinding
getLinkage, getName, getNameCharArray, getOwner, getScope
-
-
-
-
Method Detail
-
getParameters
IParameter[] getParameters()
Returns the formal parameters of the function.
-
getFunctionScope
IScope getFunctionScope()
Returns the function scope
-
getType
IFunctionType getType()
Returns the IFunctionType for this function
-
isStatic
boolean isStatic()
Returnstrue
if the function has the static storage-class specifier similarly for extern, auto, register.
-
isExtern
boolean isExtern()
-
isAuto
boolean isAuto()
-
isRegister
boolean isRegister()
-
isInline
boolean isInline()
Returnstrue
if the function is inline.
-
takesVarArgs
boolean takesVarArgs()
Returnstrue
if this function takes variable arguments.
-
isNoReturn
boolean isNoReturn()
Returnstrue
if this function never returns. Based on 'noreturn' attribute in the function declaration.- Since:
- 5.4
-
isNoDiscard
boolean isNoDiscard()
Returnstrue
if return value of this function must not be discarded. Based on 'nodiscard' attribute in the function declaration or in C using the flag 'warn_unused_result'- Since:
- 7.0
-
-