| 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" |
| 184 | " |-ParmVarDecl 0x2444aa0 <col:10, col:14> col:14 used x 'int'\n" |
| 185 | " `-CompoundStmt 0x2444e00 <col:17, line:8:1>\n" |
| 186 | " `-SwitchStmt 0x2444c88 <line:2:5, line:7:5>\n" |
| 187 | " |-<<<NULL>>>\n" |
| 188 | " |-<<<NULL>>>\n" |
| 189 | " |-ImplicitCastExpr 0x2444c70 <line:2:13> 'int' <LValueToRValue>\n" |
| 190 | " | `-DeclRefExpr 0x2444c48 <col:13> 'int' lvalue ParmVar 0x2444aa0 'x' 'int'\n" |
| 191 | " `-CompoundStmt 0x2444de0 <col:16, line:7:5>\n" |
| 192 | " |-CaseStmt 0x2444cd8 <line:3:9, line:5:15>\n" |
| 193 | " | |-IntegerLiteral 0x2444cb8 <line:3:14> 'int' 16\n" |
| 194 | " | |-<<<NULL>>>\n" |
| 195 | " | `-CaseStmt 0x2444d30 <line:4:9, line:5:15>\n" |
| 196 | " | |-IntegerLiteral 0x2444d10 <line:4:14> 'int' 32\n" |
| 197 | " | |-<<<NULL>>>\n" |
| 198 | " | `-BinaryOperator 0x2444db0 <line:5:13, col:15> 'int' '='\n" |
| 199 | " | |-DeclRefExpr 0x2444d68 <col:13> 'int' lvalue ParmVar 0x2444aa0 'x' 'int'\n" |
| 200 | " | `-IntegerLiteral 0x2444d90 <col:15> 'int' 123\n" |
| 201 | " `-BreakStmt 0x2444dd8 <line:6:13>"; |
| 202 | ASSERT_EQUALS("void foo ( int x@1 ) { switch ( x@1 ) { case 16 : case 32 : x@1 = 123 ; break ; } }", parse(clang)); |
| 203 | } |
| 204 | |
| 205 | void characterLiteral() { |
| 206 | const char clang[] = "`-VarDecl 0x3df8608 <a.cpp:1:1, col:10> col:6 c 'char' cinit\n" |