aboutsummaryrefslogtreecommitdiff
path: root/build2/algorithm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/algorithm.cxx')
-rw-r--r--build2/algorithm.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/build2/algorithm.cxx b/build2/algorithm.cxx
index fbeb365..b4f2843 100644
--- a/build2/algorithm.cxx
+++ b/build2/algorithm.cxx
@@ -434,11 +434,12 @@ namespace build2
// Match.
//
- // Clear the resolved targets list and the data pad before calling
- // match(). The rule is free to modify these in its match()
- // (provided that it matches) in order to, for example, convey some
- // information to apply().
+ // Clear the rule-specific variables, resolved targets list, and the
+ // data pad before calling match(). The rule is free to modify these
+ // in its match() (provided that it matches) in order to, for
+ // example, convey some information to apply().
//
+ s.vars.clear ();
t.prerequisite_targets[a].clear ();
if (a.inner ()) t.clear_data ();
@@ -479,6 +480,7 @@ namespace build2
// As a sanity measure clear the target data since it can be incomplete
// or invalid (mark()/unmark() should give you some ideas).
//
+ s.vars.clear ();
t.prerequisite_targets[a].clear ();
if (a.inner ()) t.clear_data ();