Skip to content

Commit

Permalink
Silent compiler warning about missing override keywords (shader-slang…
Browse files Browse the repository at this point in the history
…#4018)

Adding "override" keywords for member functions whereever they need.
The compiler warning was visible on CI build but not visible on local
visual studio build.
  • Loading branch information
jkwak-work authored Apr 24, 2024
1 parent 97631e9 commit 211b2ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/compiler-core/slang-metal-compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace Slang

virtual SLANG_NO_THROW bool SLANG_MCALL isFileBased() override { return true; }

virtual SLANG_NO_THROW SlangResult SLANG_MCALL compile(const CompileOptions& options, IArtifact** outArtifact)
virtual SLANG_NO_THROW SlangResult SLANG_MCALL compile(const CompileOptions& options, IArtifact** outArtifact) override
{
// All compile requests should be routed directly to the inner compiler.
return cppCompiler->compile(options, outArtifact);
Expand Down
2 changes: 1 addition & 1 deletion source/slang/slang-check-decl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9847,7 +9847,7 @@ namespace Slang
loc = Base::sourceLocStack.getLast();
handleReferenceFunc(decl, decl->inferredCapabilityRequirements, loc);
}
virtual void processDeclModifiers(Decl* decl)
virtual void processDeclModifiers(Decl* decl) override
{
if (decl)
handleReferenceFunc(decl, decl->inferredCapabilityRequirements, decl->loc);
Expand Down
2 changes: 1 addition & 1 deletion source/slang/slang-compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ namespace Slang
char const* name,
SlangStage stage,
slang::IEntryPoint** outEntryPoint,
ISlangBlob** outDiagnostics)
ISlangBlob** outDiagnostics) override
{
ComPtr<slang::IEntryPoint> entryPoint(findAndCheckEntryPoint(UnownedStringSlice(name), stage, outDiagnostics));
if ((!entryPoint))
Expand Down

0 comments on commit 211b2ff

Please sign in to comment.