41 visitDepthFirst(clause, [&](const Aggregator& agg) {
44 std::set<std::string> localVariables = analysis::getLocalVariables(translationUnit, clause, agg);
45 std::set<std::string> variablesOutsideAggregate =
46 analysis::getVariablesOutsideAggregate(clause, agg);
47 for (const std::string& name : localVariables) {
48 if (variablesOutsideAggregate.find(name) != variablesOutsideAggregate.end()) {
50 std::string uniqueName = analysis::findUniqueVariableName(clause, name);
51 visitDepthFirst(agg, [&](const Variable& var) {
52 if (var.getName() == name) {
53 const_cast<Variable&>(var).setName(uniqueName);