summaryrefslogtreecommitdiff
path: root/source/core/slang-visual-studio-compiler-util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/slang-visual-studio-compiler-util.cpp')
-rw-r--r--source/core/slang-visual-studio-compiler-util.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/core/slang-visual-studio-compiler-util.cpp b/source/core/slang-visual-studio-compiler-util.cpp
index af05c9c95..a3578483f 100644
--- a/source/core/slang-visual-studio-compiler-util.cpp
+++ b/source/core/slang-visual-studio-compiler-util.cpp
@@ -258,21 +258,21 @@ namespace Slang
return SLANG_OK;
}
-static SlangResult _parseErrorType(const UnownedStringSlice& in, DownstreamDiagnostics::Diagnostic::Type& outType)
+static SlangResult _parseSeverity(const UnownedStringSlice& in, DownstreamDiagnostics::Diagnostic::Severity& outSeverity)
{
- typedef DownstreamDiagnostics::Diagnostic::Type Type;
+ typedef DownstreamDiagnostics::Diagnostic::Severity Type;
if (in == "error" || in == "fatal error")
{
- outType = Type::Error;
+ outSeverity = Type::Error;
}
else if (in == "warning")
{
- outType = Type::Warning;
+ outSeverity = Type::Warning;
}
else if (in == "info")
{
- outType = Type::Info;
+ outSeverity = Type::Info;
}
else
{
@@ -289,7 +289,7 @@ static SlangResult _parseVisualStudioLine(const UnownedStringSlice& line, Downst
if (line.startsWith(linkPrefix))
{
outDiagnostic.stage = Diagnostic::Stage::Link;
- outDiagnostic.type = Diagnostic::Type::Info;
+ outDiagnostic.severity = Diagnostic::Severity::Info;
outDiagnostic.text = UnownedStringSlice(line.begin() + linkPrefix.getLength(), line.end());
@@ -394,7 +394,7 @@ static SlangResult _parseVisualStudioLine(const UnownedStringSlice& line, Downst
}
// Extract the bit before the code
- SLANG_RETURN_ON_FAIL(_parseErrorType(UnownedStringSlice(errorSection.begin(), errorSection.begin() + errorCodeIndex).trim(), outDiagnostic.type));
+ SLANG_RETURN_ON_FAIL(_parseSeverity(UnownedStringSlice(errorSection.begin(), errorSection.begin() + errorCodeIndex).trim(), outDiagnostic.severity));
// Link codes start with LNK prefix
postError = UnownedStringSlice(postPath.begin() + errorColonIndex + 1, end);
@@ -426,7 +426,7 @@ static SlangResult _parseVisualStudioLine(const UnownedStringSlice& line, Downst
}
// if it has a compilation error.. set on output
- if (outDiagnostics.has(Diagnostic::Type::Error))
+ if (outDiagnostics.has(Diagnostic::Severity::Error))
{
outDiagnostics.result = SLANG_FAIL;
}