File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -628,8 +628,12 @@ AttrVisitor::visit (AST::TypeCastExpr &expr)
628
628
void
629
629
AttrVisitor::visit (AST::AssignmentExpr &expr)
630
630
{
631
- /* outer attributes never allowed before these. while cannot strip
632
- * two direct descendant expressions, can strip ones below that */
631
+ expander.expand_cfg_attrs (expr.get_outer_attrs ());
632
+ if (expander.fails_cfg_with_expand (expr.get_outer_attrs ()))
633
+ {
634
+ expr.mark_for_strip ();
635
+ return ;
636
+ }
633
637
634
638
/* should have no possibility for outer attrs as would be parsed
635
639
* with outer expr */
Original file line number Diff line number Diff line change @@ -71,8 +71,12 @@ class AttrVisitor : public AST::ASTVisitor
71
71
it = values.erase (it);
72
72
for (auto &node : fragment.get_nodes ())
73
73
{
74
- it = values.insert (it, extractor (node));
75
- it++;
74
+ auto new_node = extractor (node);
75
+ if (new_node != nullptr && !new_node->is_marked_for_strip ())
76
+ {
77
+ it = values.insert (it, std::move (new_node));
78
+ it++;
79
+ }
76
80
}
77
81
}
78
82
else if (value->is_marked_for_strip ())
You can’t perform that action at this time.
0 commit comments