Inline Clang functions


I am trying to always inline my functions (do not care about speed, performance etc). Currently I am doing it the way it has been suggested:

static inline int add(int i, int j) { return i + j; }

int main() {
int i = add(4, 5);
return i;

However if I print the AST of the program (clang -cc1 ast-dump program.c), it shows two functions, NOT the add inlined into main. Am I missing something?


AST printer prints the AST as source code as closely to source as
possible. Even more, Clang does not perform inlining on AST level, it
is performed on LLVM IR.

Also, please note that 'inline' is only an advice for the compiler,
not a hard requirement.