fix(3p/nix): Fix incorrectly braced conditionals and loops
Fixes mistakes introduced by clang-tidy in the previous commit.
This commit is contained in:
parent
b490742a51
commit
09cbc431cc
16 changed files with 62 additions and 61 deletions
15
third_party/nix/src/libexpr/value-to-xml.cc
vendored
15
third_party/nix/src/libexpr/value-to-xml.cc
vendored
|
|
@ -137,15 +137,20 @@ static void printValueAsXML(EvalState& state, bool strict, bool location,
|
|||
|
||||
if (v.lambda.fun->matchAttrs) {
|
||||
XMLAttrs attrs;
|
||||
if (!v.lambda.fun->arg.empty()) attrs["name"] = v.lambda.fun->arg;
|
||||
if (v.lambda.fun->formals->ellipsis) attrs["ellipsis"] = "1";
|
||||
if (!v.lambda.fun->arg.empty()) {
|
||||
attrs["name"] = v.lambda.fun->arg;
|
||||
}
|
||||
if (v.lambda.fun->formals->ellipsis) {
|
||||
attrs["ellipsis"] = "1";
|
||||
}
|
||||
XMLOpenElement _(doc, "attrspat", attrs);
|
||||
for (auto& i : v.lambda.fun->formals->formals)
|
||||
for (auto& i : v.lambda.fun->formals->formals) {
|
||||
doc.writeEmptyElement("attr", singletonAttrs("name", i.name));
|
||||
}
|
||||
} else {
|
||||
doc
|
||||
doc.writeEmptyElement("varpat",
|
||||
singletonAttrs("name", v.lambda.fun->arg));
|
||||
}
|
||||
.writeEmptyElement("varpat", singletonAttrs("name", v.lambda.fun->arg));
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue