summaryrefslogtreecommitdiff
path: root/source/slang
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2023-11-18 02:50:40 +0800
committerGitHub <noreply@github.com>2023-11-17 10:50:40 -0800
commit27243ce07880f65f9abb15e38f7176eea9572aac (patch)
treec11db10cd6959cebfb198bc436f8694e404d9a9e /source/slang
parent240aa243527eabcf87c30aabf9749396de47b1b2 (diff)
warnings (#3335)
* ignores * Remove unused variables * Squash out of bounds warning --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang')
-rw-r--r--source/slang/slang-language-server.cpp2
-rw-r--r--source/slang/slang-lower-to-ir.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/source/slang/slang-language-server.cpp b/source/slang/slang-language-server.cpp
index e550b23d2..24ab534ab 100644
--- a/source/slang/slang-language-server.cpp
+++ b/source/slang/slang-language-server.cpp
@@ -654,7 +654,7 @@ SlangResult LanguageServer::hover(
{
if (auto declRefExpr = as<DeclRefExpr>(expr))
return fillDeclRefHoverInfo(declRefExpr->declRef);
- else if (auto thisExpr = as<ThisExpr>(expr))
+ else if (as<ThisExpr>(expr))
{
if (expr->type)
{
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index cd9d19bcc..e44419a45 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -8038,8 +8038,6 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo>
// Not clear what to do around HLSLExportModifier.
// The HLSL spec says it only applies to functions, so we ignore for now.
- const bool isPublicType = decl->findModifier<PublicModifier>() != nullptr;
-
// We are going to create nested IR building state
// to use when emitting the members of the type.
//
@@ -9761,7 +9759,7 @@ LoweredValInfo emitDeclRef(
SLANG_UNUSED(initialSubst);
- if (auto thisTypeDecl = as<ThisTypeDecl>(decl))
+ if (as<ThisTypeDecl>(decl))
{
// A declref to ThisType decl should be lowered differently
// from other decls. In general, IFoo<T>.ThisType should lower to