diff options
| author | Yong He <yonghe@outlook.com> | 2023-07-21 15:35:54 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-21 15:35:54 -0700 |
| commit | 2d4cd997bcc95cb13552b540c376a8200f3766d5 (patch) | |
| tree | b5fa250d6efda989a1cc204787b98e981a40bec1 /source | |
| parent | 0e478443815c62c6d6cd042fbbeaeceeb6830478 (diff) | |
Don't error on disabled warnings when treatWarnAsErr. (#3013)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source')
| -rw-r--r-- | source/compiler-core/slang-diagnostic-sink.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/compiler-core/slang-diagnostic-sink.cpp b/source/compiler-core/slang-diagnostic-sink.cpp index 197e9bb64..a8d981545 100644 --- a/source/compiler-core/slang-diagnostic-sink.cpp +++ b/source/compiler-core/slang-diagnostic-sink.cpp @@ -592,7 +592,7 @@ Severity DiagnosticSink::getEffectiveMessageSeverity(DiagnosticInfo const& info) effectiveSeverity = *pSeverityOverride; } - if (isFlagSet(Flag::TreatWarningsAsErrors) && info.severity == Severity::Warning) + if (isFlagSet(Flag::TreatWarningsAsErrors) && effectiveSeverity == Severity::Warning) effectiveSeverity = Severity::Error; return effectiveSeverity; |
