diff options
Diffstat (limited to 'source/compiler-core')
| -rw-r--r-- | source/compiler-core/slang-source-loc.cpp | 1 | ||||
| -rw-r--r-- | source/compiler-core/slang-visual-studio-compiler-util.cpp | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/source/compiler-core/slang-source-loc.cpp b/source/compiler-core/slang-source-loc.cpp index f9014e0d8..33f93074e 100644 --- a/source/compiler-core/slang-source-loc.cpp +++ b/source/compiler-core/slang-source-loc.cpp @@ -318,7 +318,6 @@ SlangResult SourceView::_findSourceMapLoc(SourceLoc loc, SourceLocType type, Han // view, which may be a parent to the current one. auto lookupSourceManager = m_sourceFile->getSourceManager(); - HandleSourceLoc handleLoc; SLANG_RETURN_ON_FAIL(_findLocWithSourceMap(lookupSourceManager, this, loc, type, outLoc)); return SLANG_OK; diff --git a/source/compiler-core/slang-visual-studio-compiler-util.cpp b/source/compiler-core/slang-visual-studio-compiler-util.cpp index 81e00d73e..14fad0aec 100644 --- a/source/compiler-core/slang-visual-studio-compiler-util.cpp +++ b/source/compiler-core/slang-visual-studio-compiler-util.cpp @@ -83,14 +83,17 @@ static void _addFile(const String& path, const ArtifactDesc& desc, IOSFileArtifa // Display full path of source files in diagnostics cmdLine.addArg("/FC"); - if (options.flags & CompileOptions::Flag::EnableExceptionHandling) + if (options.sourceLanguage == SLANG_SOURCE_LANGUAGE_CPP) { - if (options.sourceLanguage == SLANG_SOURCE_LANGUAGE_CPP) + if (options.flags & CompileOptions::Flag::EnableExceptionHandling) { // https://docs.microsoft.com/en-us/cpp/build/reference/eh-exception-handling-model?view=vs-2019 // Assumes c functions cannot throw cmdLine.addArg("/EHsc"); } + + // To maintain parity with the slang compiler headers which are shared + cmdLine.addArg("/std:c++17"); } if (options.flags & CompileOptions::Flag::Verbose) |
