diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2024-06-06 11:21:23 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-06 11:21:23 -0700 |
| commit | fa664d1419659e3c56db823c60f2b9cc088455cd (patch) | |
| tree | 26cbe8f09e0d30317889b7f9a2498670cf93d9e6 /source/slang/slang-options.cpp | |
| parent | f1490526be567059a8e4b98aa41eef698065aee1 (diff) | |
Fix build warnings and treat warnings as error on CI (#4276)
* Fix build warnings and treat warnings as error
Diffstat (limited to 'source/slang/slang-options.cpp')
| -rw-r--r-- | source/slang/slang-options.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index a51ea01fe..7b4b02f68 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -2527,24 +2527,24 @@ SlangResult OptionsParser::_parse( // target that handles that format. Dictionary<CodeGenTarget, int> mapFormatToTargetIndex; - // If there was no explicit `-target` specified, then we will look - // at the `-o` options to see what we can infer. - // - if (m_rawTargets.getCount() == 0) - { - // If there are no targets and no outputs - if (m_rawOutputs.getCount() == 0) - { - m_requestImpl->m_emitIr = true; - } - else + // If there was no explicit `-target` specified, then we will look + // at the `-o` options to see what we can infer. + // + if (m_rawTargets.getCount() == 0) { - for (auto& rawOutput : m_rawOutputs) + // If there are no targets and no outputs + if (m_rawOutputs.getCount() == 0) { - // Some outputs don't imply a target format, and we shouldn't use those for inference. - auto impliedFormat = rawOutput.impliedFormat; - if (impliedFormat == CodeGenTarget::Unknown) - continue; + m_requestImpl->m_emitIr = true; + } + else + { + for (auto& rawOutput : m_rawOutputs) + { + // Some outputs don't imply a target format, and we shouldn't use those for inference. + auto impliedFormat = rawOutput.impliedFormat; + if (impliedFormat == CodeGenTarget::Unknown) + continue; int targetIndex = 0; if (!mapFormatToTargetIndex.tryGetValue(impliedFormat, targetIndex)) |
