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-cpp-extractor/file-util.h | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'tools/slang-cpp-extractor/file-util.h') diff --git a/tools/slang-cpp-extractor/file-util.h b/tools/slang-cpp-extractor/file-util.h index 01aafeedf..201825973 100644 --- a/tools/slang-cpp-extractor/file-util.h +++ b/tools/slang-cpp-extractor/file-util.h @@ -3,7 +3,8 @@ #include "diagnostics.h" -namespace CppExtract { +namespace CppExtract +{ using namespace Slang; // A macro to define a single indent as a string @@ -11,15 +12,23 @@ using namespace Slang; struct FileUtil { - /// Read text into outRead. Any failures written to sink (can be passed as nullptr, for no output) - static SlangResult readAllText(const Slang::String& fileName, DiagnosticSink* sink, String& outRead); - /// Write text to filename. Any failures written to sink. (can be passed as nullptr, for no output) - static SlangResult writeAllText(const Slang::String& fileName, DiagnosticSink* sink, const UnownedStringSlice& text); + /// Read text into outRead. Any failures written to sink (can be passed as nullptr, for no + /// output) + static SlangResult readAllText( + const Slang::String& fileName, + DiagnosticSink* sink, + String& outRead); + /// Write text to filename. Any failures written to sink. (can be passed as nullptr, for no + /// output) + static SlangResult writeAllText( + const Slang::String& fileName, + DiagnosticSink* sink, + const UnownedStringSlice& text); - /// Appends CPP_EXTRACT_INDENT_STRING indentCount number of times to out + /// Appends CPP_EXTRACT_INDENT_STRING indentCount number of times to out static void indent(Index indentCount, StringBuilder& out); }; -} // CppExtract +} // namespace CppExtract #endif -- cgit v1.2.3