diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2024-11-06 01:47:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-05 09:47:26 -0800 |
| commit | b118451e301d734e3e783b3acdf871f3f6ea851c (patch) | |
| tree | 277f160d31e2c442f724bc6a2d3c09fabff403ca /tools/slang-test/parse-diagnostic-util.cpp | |
| parent | 53dd5928c35d5a5cb1f7d2a563348fd1fa87d672 (diff) | |
Move switch statement bodies to their own lines (#5493)
* Move switch statement bodies to their own lines
* format
---------
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tools/slang-test/parse-diagnostic-util.cpp')
| -rw-r--r-- | tools/slang-test/parse-diagnostic-util.cpp | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/tools/slang-test/parse-diagnostic-util.cpp b/tools/slang-test/parse-diagnostic-util.cpp index 74012d4d2..5668868bf 100644 --- a/tools/slang-test/parse-diagnostic-util.cpp +++ b/tools/slang-test/parse-diagnostic-util.cpp @@ -84,10 +84,17 @@ static SlangResult _getSlangDiagnosticSeverity( switch (index) { - case -1: return SLANG_FAIL; - case 0: outSeverity = ArtifactDiagnostic::Severity::Info; break; - case 1: outSeverity = ArtifactDiagnostic::Severity::Warning; break; - default: outSeverity = ArtifactDiagnostic::Severity::Error; break; + case -1: + return SLANG_FAIL; + case 0: + outSeverity = ArtifactDiagnostic::Severity::Info; + break; + case 1: + outSeverity = ArtifactDiagnostic::Severity::Warning; + break; + default: + outSeverity = ArtifactDiagnostic::Severity::Error; + break; } outCode = 0; @@ -260,9 +267,12 @@ static SlangResult _findDownstreamCompiler( { switch (compilerIdentity.m_type) { - case CompilerIdentity::Slang: return &parseSlangLine; - case CompilerIdentity::DownstreamCompiler: return &parseGenericLine; - default: return nullptr; + case CompilerIdentity::Slang: + return &parseSlangLine; + case CompilerIdentity::DownstreamCompiler: + return &parseGenericLine; + default: + return nullptr; } } |
