diff --git a/codon/app/main.cpp b/codon/app/main.cpp index 459a8e74..64b8255d 100644 --- a/codon/app/main.cpp +++ b/codon/app/main.cpp @@ -14,8 +14,8 @@ #include "codon/compiler/compiler.h" #include "codon/compiler/error.h" #include "codon/compiler/jit.h" -#include "codon/util/jupyter.h" #include "codon/util/common.h" +#include "codon/util/jupyter.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/FileSystem.h" diff --git a/codon/parser/visitors/typecheck/call.cpp b/codon/parser/visitors/typecheck/call.cpp index 38929823..a9e93912 100644 --- a/codon/parser/visitors/typecheck/call.cpp +++ b/codon/parser/visitors/typecheck/call.cpp @@ -943,8 +943,8 @@ std::pair TypecheckVisitor::transformInternalStaticFn(CallExpr *e auto idx = ctx->getStaticInt(expr->expr->type->getFunc()->funcGenerics[0].type); seqassert(idx, "expected a static integer"); auto &args = fn->getArgTypes(); - return {true, transform( - N(*idx >= 0 && *idx < args.size() && args[*idx]->canRealize()))}; + return {true, transform(N(*idx >= 0 && *idx < args.size() && + args[*idx]->canRealize()))}; } else if (expr->expr->isId("std.internal.static.fn_arg_get_type")) { auto fn = expr->args[0].value->type->getFunc(); if (!fn) @@ -1015,7 +1015,7 @@ std::pair TypecheckVisitor::transformInternalStaticFn(CallExpr *e return {true, nullptr}; std::vector tupArgs; - for (auto &a: zzz->getCall()->args) + for (auto &a : zzz->getCall()->args) tupArgs.push_back(a.value); return {true, transform(N(tupArgs))}; } else { diff --git a/codon/parser/visitors/typecheck/collections.cpp b/codon/parser/visitors/typecheck/collections.cpp index acf79ff0..91755e5d 100644 --- a/codon/parser/visitors/typecheck/collections.cpp +++ b/codon/parser/visitors/typecheck/collections.cpp @@ -249,7 +249,9 @@ void TypecheckVisitor::visit(GeneratorExpr *expr) { seqassert(expr->loops[0].vars->getId(), "tuple() not simplified"); std::vector vars{expr->loops[0].vars->getId()->value}; - auto suiteVec = expr->expr->getStmtExpr() ? expr->expr->getStmtExpr()->stmts[0]->getSuite() : nullptr; + auto suiteVec = expr->expr->getStmtExpr() + ? expr->expr->getStmtExpr()->stmts[0]->getSuite() + : nullptr; auto oldSuite = suiteVec ? suiteVec->clone() : nullptr; for (int validI = 0; suiteVec && validI < suiteVec->stmts.size(); validI++) { if (auto a = suiteVec->stmts[validI]->getAssign()) @@ -263,10 +265,10 @@ void TypecheckVisitor::visit(GeneratorExpr *expr) { } if (vars.size() > 1) vars.erase(vars.begin()); - auto [ok, staticItems] = transformStaticLoopCall( - vars, expr->loops[0].gen, [&](StmtPtr wrap) { - return N( wrap, clone(expr->expr)); - }); + auto [ok, staticItems] = + transformStaticLoopCall(vars, expr->loops[0].gen, [&](StmtPtr wrap) { + return N(wrap, clone(expr->expr)); + }); if (ok) { std::vector tupleItems; for (auto &i : staticItems) @@ -277,7 +279,6 @@ void TypecheckVisitor::visit(GeneratorExpr *expr) { expr->expr->getStmtExpr()->stmts[0] = oldSuite; } - auto tuple = gen->type->getRecord(); if (!tuple || !(startswith(tuple->name, TYPE_TUPLE) || startswith(tuple->name, TYPE_KWTUPLE))) diff --git a/codon/util/common.cpp b/codon/util/common.cpp index 70dd4098..bf08dcf5 100644 --- a/codon/util/common.cpp +++ b/codon/util/common.cpp @@ -2,11 +2,11 @@ #include "common.h" +#include "llvm/Support/Path.h" #include #include #include #include -#include "llvm/Support/Path.h" namespace codon { namespace { diff --git a/codon/util/jupyter.cpp b/codon/util/jupyter.cpp index d135d2a1..c9e6a4f9 100644 --- a/codon/util/jupyter.cpp +++ b/codon/util/jupyter.cpp @@ -7,7 +7,8 @@ namespace codon { int startJupyterKernel(const std::string &argv0, const std::vector &plugins, const std::string &configPath) { - fprintf(stderr, "Jupyter support not included. Please install Codon Jupyter plugin.\n"); + fprintf(stderr, + "Jupyter support not included. Please install Codon Jupyter plugin.\n"); return EXIT_FAILURE; }