File tree 1 file changed +14
-16
lines changed
1 file changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -903,29 +903,27 @@ class sema
903
903
904
904
auto start (compound_statement_node const & n, int ) -> void
905
905
{
906
- if (!active_selections.empty ()) {
907
- assert (active_selections.back ());
908
- if (active_selections.back ()->true_branch .get () == &n) {
909
- symbols.emplace_back ( scope_depth, compound_sym{ true , &n, true } );
906
+ symbols.emplace_back (
907
+ scope_depth,
908
+ compound_sym{
909
+ true ,
910
+ &n,
911
+ !active_selections.empty () && active_selections.back ()->true_branch .get () == &n
910
912
}
911
- else if (active_selections.back ()->false_branch .get () == &n) {
912
- symbols.emplace_back ( scope_depth, compound_sym{ true , &n, false } );
913
- }
914
- }
913
+ );
915
914
++scope_depth;
916
915
}
917
916
918
917
auto end (compound_statement_node const & n, int ) -> void
919
918
{
920
- if (!active_selections.empty ()) {
921
- assert (active_selections.back ());
922
- if (active_selections.back ()->true_branch .get () == &n) {
923
- symbols.emplace_back ( scope_depth, compound_sym{ false , &n, true } );
919
+ symbols.emplace_back (
920
+ scope_depth,
921
+ compound_sym{
922
+ false ,
923
+ &n,
924
+ !active_selections.empty () && active_selections.back ()->true_branch .get () == &n
924
925
}
925
- else if (active_selections.back ()->false_branch .get () == &n) {
926
- symbols.emplace_back ( scope_depth, compound_sym{ false , &n, false } );
927
- }
928
- }
926
+ );
929
927
--scope_depth;
930
928
}
931
929
You can’t perform that action at this time.
0 commit comments