File tree Expand file tree Collapse file tree 2 files changed +30
-4
lines changed Expand file tree Collapse file tree 2 files changed +30
-4
lines changed Original file line number Diff line number Diff line change @@ -2462,10 +2462,7 @@ parse_switch_statement (void)
2462
2462
}
2463
2463
current_token_must_be (TOK_CLOSE_BRACE);
2464
2464
2465
- if (was_default)
2466
- {
2467
- dump_default_clause_check_for_rewrite ();
2468
- }
2465
+ dump_default_clause_check_for_rewrite ();
2469
2466
2470
2467
lexer_seek (start_loc);
2471
2468
next_token_must_be (TOK_OPEN_BRACE);
@@ -2501,6 +2498,12 @@ parse_switch_statement (void)
2501
2498
parse_statement_list ();
2502
2499
skip_newlines ();
2503
2500
}
2501
+
2502
+ if (!was_default)
2503
+ {
2504
+ rewrite_default_clause ();
2505
+ }
2506
+
2504
2507
current_token_must_be (TOK_CLOSE_BRACE);
2505
2508
skip_token ();
2506
2509
Original file line number Diff line number Diff line change
1
+ // Copyright 2015 Samsung Electronics Co., Ltd.
2
+ // Copyright 2015 University of Szeged.
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // http://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+
16
+ switch ( 1 ) {
17
+ case 0 :
18
+ assert ( false ) ;
19
+ break ;
20
+ case 2 :
21
+ assert ( false ) ;
22
+ break ;
23
+ }
You can’t perform that action at this time.
0 commit comments