| 164 | } |
| 165 | |
| 166 | void callExpr() { |
| 167 | const char clang[] = "`-FunctionDecl 0x2444b60 <1.c:1:1, line:8:1> line:1:6 foo 'void (int)'\n" |
| 168 | " |-ParmVarDecl 0x2444aa0 <col:10, col:14> col:14 used x 'int'\n" |
| 169 | " `-CompoundStmt 0x2444e00 <col:17, line:8:1>\n" |
| 170 | " `-CallExpr 0x7f5a6c04b158 <line:1:16, col:60> 'bool'\n" |
| 171 | " |-ImplicitCastExpr 0x7f5a6c04b140 <col:16, col:23> 'bool (*)(const Token *, const char *, int)' <FunctionToPointerDecay>\n" |
| 172 | " | `-DeclRefExpr 0x7f5a6c04b0a8 <col:16, col:23> 'bool (const Token *, const char *, int)' lvalue CXXMethod 0x43e5600 'Match' 'bool (const Token *, const char *, int)'\n" |
| 173 | " |-ImplicitCastExpr 0x7f5a6c04b1c8 <col:29> 'const Token *' <NoOp>\n" |
| 174 | " | `-ImplicitCastExpr 0x7f5a6c04b1b0 <col:29> 'Token *' <LValueToRValue>\n" |
| 175 | " | `-DeclRefExpr 0x7f5a6c04b0e0 <col:29> 'Token *' lvalue Var 0x7f5a6c045968 'tokAfterCondition' 'Token *'\n" |
| 176 | " |-ImplicitCastExpr 0x7f5a6c04b1e0 <col:48> 'const char *' <ArrayToPointerDecay>\n" |
| 177 | " | `-StringLiteral 0x7f5a6c04b108 <col:48> 'const char [11]' lvalue \"%name% : {\"\n" |
| 178 | " `-CXXDefaultArgExpr 0x7f5a6c04b1f8 <<invalid sloc>> 'int'\n"; |
| 179 | ASSERT_EQUALS("void foo ( int x@1 ) { Match ( tokAfterCondition , \"%name% : {\" ) ; }", parse(clang)); |
| 180 | } |
| 181 | |
| 182 | void caseStmt1() { |
| 183 | const char clang[] = "`-FunctionDecl 0x2444b60 <1.c:1:1, line:8:1> line:1:6 foo 'void (int)'\n" |