From 5ffced67a710d7f7786f2d1a6a86ab8450dd8eb0 Mon Sep 17 00:00:00 2001 From: Raphael Amorim Date: Thu, 11 Jun 2026 08:01:22 +0200 Subject: [PATCH] format code --- src/analyzer.cpp | 4 ++-- src/codegen.cpp | 3 +-- src/main.cpp | 14 ++++++-------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/analyzer.cpp b/src/analyzer.cpp index 5d5c272..7c46510 100644 --- a/src/analyzer.cpp +++ b/src/analyzer.cpp @@ -140,8 +140,8 @@ bool Analyzer::resolveTypeFieldsStruct(DeclIndex idx) { if (idx == kNoDecl) return false; Decl &d = decls_.get(idx); if (d.kind != DeclKind::Struct) return false; - BodyModuleGuard bmg( - ctx_, d.structAst ? d.structAst->modulePath : std::string()); + BodyModuleGuard bmg(ctx_, + d.structAst ? d.structAst->modulePath : std::string()); switch (d.structStatus) { case StructStatus::HaveFieldTypes: diff --git a/src/codegen.cpp b/src/codegen.cpp index 31c5eb9..eee0d76 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -1663,8 +1663,7 @@ TypeIdx JamCodegenContext::instantiateStructExpr( // private sibling type must not trip the trigger-site module's // handle-privacy gate. (Pass 2 bodies push the same module // per-method below.) - const_cast(*this).pushBodyModule( - definingModulePath_); + const_cast(*this).pushBodyModule(definingModulePath_); std::vector fieldLLVM; fieldLLVM.reserve(instFields.size()); diff --git a/src/main.cpp b/src/main.cpp index cd52f73..fff68f7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -480,7 +480,8 @@ static int compileAndRun(const std::string &filename, return out; }; auto declareStructs = [&](ModuleAST *m, bool publicOnly) { - (void)publicOnly; // see registerTopLevelDecls: private types register too + (void)publicOnly; // see registerTopLevelDecls: private types register + // too for (auto &s : m->Structs) { std::string q = qualifyTypeName(s->modulePath, s->Name); JamTypeRef structType = @@ -1658,9 +1659,8 @@ static int compileAndRun(const std::string &filename, break; case jam::OS::Linux: case jam::OS::FreeBSD: - linkArgs.push_back((strip == JAM_STRIP_SYMBOLS) - ? "-Wl,-s" - : "-Wl,--strip-debug"); + linkArgs.push_back( + (strip == JAM_STRIP_SYMBOLS) ? "-Wl,-s" : "-Wl,--strip-debug"); break; case jam::OS::Windows: case jam::OS::Unknown: @@ -2141,8 +2141,7 @@ int main(int argc, char *argv[]) { // as a coherent block on completion. JAM_TEST_JOBS=1 forces the // serial in-process path (useful under a debugger). long hw = sysconf(_SC_NPROCESSORS_ONLN); - unsigned jobs = - static_cast(hw > 1 ? (hw > 8 ? 8 : hw) : 1); + unsigned jobs = static_cast(hw > 1 ? (hw > 8 ? 8 : hw) : 1); if (const char *env = std::getenv("JAM_TEST_JOBS")) { int v = std::atoi(env); if (v >= 1) jobs = static_cast(v); @@ -2235,8 +2234,7 @@ int main(int argc, char *argv[]) { << active[i].out; if (rc != 0) failed++; else passed++; - active.erase(active.begin() + - static_cast(i)); + active.erase(active.begin() + static_cast(i)); reaped = true; } if (!sawData && !reaped && !active.empty()) usleep(2000); -- 2.51.2