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
| `-FunctionDecl 0x12d0ffa20 <hello.c:2:1, line:11:1> line:2:5 main 'int (int, char **)' |-ParmVarDecl 0x12d0ff800 <col:10, col:14> col:14 argc 'int' |-ParmVarDecl 0x12d0ff900 <col:20, col:31> col:26 argv 'char **':'char **' `-CompoundStmt 0x12d0fff68 <col:33, line:11:1> |-DeclStmt 0x12d0ffb70 <line:3:5, col:17> | `-VarDecl 0x12d0ffae8 <col:5, col:15> col:9 used age 'int' cinit | `-IntegerLiteral 0x12d0ffb50 <col:15> 'int' 45 |-IfStmt 0x12d0fff08 <line:4:5, line:9:5> has_else | |-BinaryOperator 0x12d0ffc60 <line:4:9, col:21> 'int' '>=' | | |-ImplicitCastExpr 0x12d0ffc48 <col:9> 'int' <LValueToRValue> | | | `-DeclRefExpr 0x12d0ffb88 <col:9> 'int' lvalue Var 0x12d0ffae8 'age' 'int' | | `-BinaryOperator 0x12d0ffc28 <col:16, col:21> 'int' '+' | | |-BinaryOperator 0x12d0ffbe8 <col:16, col:19> 'int' '+' | | | |-IntegerLiteral 0x12d0ffba8 <col:16> 'int' 17 | | | `-IntegerLiteral 0x12d0ffbc8 <col:19> 'int' 8 | | `-IntegerLiteral 0x12d0ffc08 <col:21> 'int' 20 | |-CompoundStmt 0x12d0ffdc0 <col:25, line:6:5> | | `-CallExpr 0x12d0ffd68 <line:5:9, col:35> 'int' | | |-ImplicitCastExpr 0x12d0ffd50 <col:9> 'int (*)(const char *, ...)' <FunctionToPointerDecay> | | | `-DeclRefExpr 0x12d0ffc80 <col:9> 'int (const char *, ...)' Function 0x12d0e5588 'printf' 'int (const char *, ...)' | | `-ImplicitCastExpr 0x12d0ffda8 <col:16> 'const char *' <NoOp> | | `-ImplicitCastExpr 0x12d0ffd90 <col:16> 'char *' <ArrayToPointerDecay> | | `-StringLiteral 0x12d0ffcd8 <col:16> 'char[17]' lvalue "Hello old man!\\n" | `-CompoundStmt 0x12d0ffef0 <line:7:9, line:9:5> | `-CallExpr 0x12d0ffe98 <line:8:9, col:37> 'int' | |-ImplicitCastExpr 0x12d0ffe80 <col:9> 'int (*)(const char *, ...)' <FunctionToPointerDecay> | | `-DeclRefExpr 0x12d0ffdd8 <col:9> 'int (const char *, ...)' Function 0x12d0e5588 'printf' 'int (const char *, ...)' | `-ImplicitCastExpr 0x12d0ffed8 <col:16> 'const char *' <NoOp> | `-ImplicitCastExpr 0x12d0ffec0 <col:16> 'char *' <ArrayToPointerDecay> | `-StringLiteral 0x12d0ffe38 <col:16> 'char[19]' lvalue "Hello young man!\\n" `-ReturnStmt 0x12d0fff58 <line:10:5, col:12> `-IntegerLiteral 0x12d0fff38 <col:12> 'int' 0 ❯ clang -Xclang -ast-dump -fsyntax-only hello.c > hello.ast
|