blob: e3ff61179704b571f90f77738ae978ef6694a449 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
/*******************************************************************************
* Copyright (c) 2004, 2012 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Doug Schaefer (IBM) - Initial API and implementation
* Sergey Prigogin (Google)
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast;
/**
* This represents a function in the program. A function is also a scope
* for other bindings.
*
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IFunction extends IBinding {
/**
* Returns the formal parameters of the function.
*/
public IParameter[] getParameters();
/**
* Returns the function scope
*/
public IScope getFunctionScope();
/**
* Returns the IFunctionType for this function
*/
public IFunctionType getType();
/**
* Returns {@code true} if the function has the static storage-class specifier
* similarly for extern, auto, register.
*/
public boolean isStatic();
public boolean isExtern();
public boolean isAuto();
public boolean isRegister();
/**
* Returns {@code true} if the function is inline.
*/
public boolean isInline();
/**
* Returns {@code true} if this function takes variable arguments.
*/
public boolean takesVarArgs();
/**
* Returns {@code true} if this function never returns. Based on 'noreturn' attribute in
* the function declaration.
* @since 5.4
*/
public boolean isNoReturn();
/**
* Returns {@code true} 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 6.12
*/
public boolean isNoDiscard();
}
|