@@ -643,10 +643,19 @@ AttrVisitor::visit (AST::ComparisonExpr &expr)
643
643
644
644
/* should have no possibility for outer attrs as would be parsed
645
645
* with outer expr */
646
- expr.get_left_expr ()->accept_vis (*this );
646
+ auto &l_expr = expr.get_left_expr ();
647
+ l_expr->accept_vis (*this );
648
+ auto l_fragment = expander.take_expanded_fragment (*this );
649
+ if (l_fragment.should_expand ())
650
+ l_expr = l_fragment.take_expression_fragment ();
651
+
647
652
/* should syntactically not have outer attributes, though this may
648
653
* not have worked in practice */
649
- expr.get_right_expr ()->accept_vis (*this );
654
+ auto &r_expr = expr.get_right_expr ();
655
+ r_expr->accept_vis (*this );
656
+ auto r_fragment = expander.take_expanded_fragment (*this );
657
+ if (r_fragment.should_expand ())
658
+ r_expr = r_fragment.take_expression_fragment ();
650
659
651
660
// ensure that they are not marked for strip
652
661
if (expr.get_left_expr ()->is_marked_for_strip ())
@@ -667,10 +676,19 @@ AttrVisitor::visit (AST::LazyBooleanExpr &expr)
667
676
668
677
/* should have no possibility for outer attrs as would be parsed
669
678
* with outer expr */
670
- expr.get_left_expr ()->accept_vis (*this );
679
+ auto &l_expr = expr.get_left_expr ();
680
+ l_expr->accept_vis (*this );
681
+ auto l_fragment = expander.take_expanded_fragment (*this );
682
+ if (l_fragment.should_expand ())
683
+ l_expr = l_fragment.take_expression_fragment ();
684
+
671
685
/* should syntactically not have outer attributes, though this may
672
686
* not have worked in practice */
673
- expr.get_right_expr ()->accept_vis (*this );
687
+ auto &r_expr = expr.get_right_expr ();
688
+ r_expr->accept_vis (*this );
689
+ auto r_fragment = expander.take_expanded_fragment (*this );
690
+ if (r_fragment.should_expand ())
691
+ r_expr = r_fragment.take_expression_fragment ();
674
692
675
693
// ensure that they are not marked for strip
676
694
if (expr.get_left_expr ()->is_marked_for_strip ())
@@ -718,10 +736,19 @@ AttrVisitor::visit (AST::AssignmentExpr &expr)
718
736
719
737
/* should have no possibility for outer attrs as would be parsed
720
738
* with outer expr */
721
- expr.get_left_expr ()->accept_vis (*this );
739
+ auto &l_expr = expr.get_left_expr ();
740
+ l_expr->accept_vis (*this );
741
+ auto l_fragment = expander.take_expanded_fragment (*this );
742
+ if (l_fragment.should_expand ())
743
+ l_expr = l_fragment.take_expression_fragment ();
744
+
722
745
/* should syntactically not have outer attributes, though this may
723
746
* not have worked in practice */
724
- expr.get_right_expr ()->accept_vis (*this );
747
+ auto &r_expr = expr.get_right_expr ();
748
+ r_expr->accept_vis (*this );
749
+ auto r_fragment = expander.take_expanded_fragment (*this );
750
+ if (r_fragment.should_expand ())
751
+ r_expr = r_fragment.take_expression_fragment ();
725
752
726
753
// ensure that they are not marked for strip
727
754
if (expr.get_left_expr ()->is_marked_for_strip ())
0 commit comments