fix(3p/nix): revert "apply all clang-tidy fixes"

This reverts commit ef54f5da9f.

Resolved conflicts:
	third_party/nix/src/libexpr/eval.cc
	third_party/nix/src/libstore/builtins/fetchurl.cc
	third_party/nix/src/libstore/references.cc
	third_party/nix/src/libutil/hash.cc
	third_party/nix/src/nix-daemon/nix-daemon.cc

Change-Id: Ib9cf6e96a79a23bde3983579ced3f92e530cb011
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1547
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
This commit is contained in:
Kane York 2020-08-01 15:32:00 -07:00 committed by kanepyork
parent cc3c45f739
commit 72fc2fd27e
64 changed files with 479 additions and 555 deletions

View file

@ -18,7 +18,7 @@ std::ostream& operator<<(std::ostream& str, const Expr& e) {
static void showString(std::ostream& str, const std::string& s) {
str << '"';
for (auto c : std::string(s)) {
for (auto c : (std::string)s) {
if (c == '"' || c == '\\' || c == '$') {
str << "\\" << c;
} else if (c == '\n') {
@ -191,7 +191,7 @@ std::ostream& operator<<(std::ostream& str, const Pos& pos) {
str << "undefined position";
} else {
str << (format(ANSI_BOLD "%1%" ANSI_NORMAL ":%2%:%3%") %
std::string(pos.file.value()) % pos.line % pos.column)
(std::string)pos.file.value() % pos.line % pos.column)
.str();
}
return str;
@ -232,8 +232,8 @@ void ExprPath::bindVars(const StaticEnv& env) {}
void ExprVar::bindVars(const StaticEnv& env) {
/* Check whether the variable appears in the environment. If so,
set its level and displacement. */
const StaticEnv* curEnv = nullptr;
unsigned int level = 0;
const StaticEnv* curEnv;
unsigned int level;
int withLevel = -1;
for (curEnv = &env, level = 0; curEnv != nullptr;
curEnv = curEnv->up, level++) {
@ -363,8 +363,8 @@ void ExprWith::bindVars(const StaticEnv& env) {
/* Does this `with' have an enclosing `with'? If so, record its
level so that `lookupVar' can look up variables in the previous
`with' if this one doesn't contain the desired attribute. */
const StaticEnv* curEnv = nullptr;
unsigned int level = 0;
const StaticEnv* curEnv;
unsigned int level;
prevWith = 0;
for (curEnv = &env, level = 1; curEnv != nullptr;
curEnv = curEnv->up, level++) {
@ -405,7 +405,7 @@ void ExprLambda::setName(Symbol& name) { this->name = name; }
std::string ExprLambda::showNamePos() const {
return (format("%1% at %2%") %
(name.has_value() ? "'" + std::string(name.value()) + "'"
(name.has_value() ? "'" + (std::string)name.value() + "'"
: "anonymous function") %
pos)
.str();