From f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Tue, 29 Oct 2024 14:49:26 +0800 Subject: format * format * Minor test fixes * enable checking cpp format in ci --- tools/slang-test/slangc-tool.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'tools/slang-test/slangc-tool.cpp') diff --git a/tools/slang-test/slangc-tool.cpp b/tools/slang-test/slangc-tool.cpp index ff44c0db6..d8ae2aa11 100644 --- a/tools/slang-test/slangc-tool.cpp +++ b/tools/slang-test/slangc-tool.cpp @@ -2,12 +2,16 @@ #include "slangc-tool.h" #include "../../source/core/slang-exception.h" -#include "../../source/core/slang-test-tool-util.h" #include "../../source/core/slang-io.h" +#include "../../source/core/slang-test-tool-util.h" using namespace Slang; -SlangResult SlangCTool::innerMain(StdWriters* stdWriters, slang::IGlobalSession* sharedSession, int argc, const char*const* argv) +SlangResult SlangCTool::innerMain( + StdWriters* stdWriters, + slang::IGlobalSession* sharedSession, + int argc, + const char* const* argv) { StdWriters::setSingleton(stdWriters); @@ -16,10 +20,12 @@ SlangResult SlangCTool::innerMain(StdWriters* stdWriters, slang::IGlobalSession* // The sharedSession always has a pre-loaded core module. // This differed test checks if the command line has an option to setup the core module. - // If so we *don't* use the sharedSession, and create a new session without the core module just for this compilation. + // If so we *don't* use the sharedSession, and create a new session without the core module just + // for this compilation. if (TestToolUtil::hasDeferredCoreModule(Index(argc - 1), argv + 1)) { - SLANG_RETURN_ON_FAIL(slang_createGlobalSessionWithoutCoreModule(SLANG_API_VERSION, session.writeRef())); + SLANG_RETURN_ON_FAIL( + slang_createGlobalSessionWithoutCoreModule(SLANG_API_VERSION, session.writeRef())); } ComPtr compileRequest; @@ -47,11 +53,13 @@ SlangResult SlangCTool::innerMain(StdWriters* stdWriters, slang::IGlobalSession* try #endif { - // Run the compiler (this will produce any diagnostics through SLANG_WRITER_TARGET_TYPE_DIAGNOSTIC). + // Run the compiler (this will produce any diagnostics through + // SLANG_WRITER_TARGET_TYPE_DIAGNOSTIC). compileRes = compileRequest->compile(); // If the compilation failed, then get out of here... - // Turn into an internal Result -> such that return code can be used to vary result to match previous behavior + // Turn into an internal Result -> such that return code can be used to vary result to match + // previous behavior compileRes = SLANG_FAILED(compileRes) ? SLANG_E_INTERNAL_FAIL : compileRes; } #ifndef _DEBUG -- cgit v1.2.3