diff options
| -rw-r--r-- | source/compiler-core/slang-include-system.h | 1 | ||||
| -rw-r--r-- | source/core/slang-smart-pointer.h | 1 | ||||
| -rw-r--r-- | source/slang/slang-check-shader.cpp | 4 | ||||
| -rw-r--r-- | source/slang/slang-ir-deduplicate.cpp | 2 | ||||
| -rw-r--r-- | source/slang/slang-ir-lower-generic-call.cpp | 4 | ||||
| -rw-r--r-- | source/slang/slang-ir-witness-table-wrapper.cpp | 4 | ||||
| -rw-r--r-- | source/slang/slang-parser.cpp | 1 |
7 files changed, 3 insertions, 14 deletions
diff --git a/source/compiler-core/slang-include-system.h b/source/compiler-core/slang-include-system.h index 70f6dd81e..1fc8eac6e 100644 --- a/source/compiler-core/slang-include-system.h +++ b/source/compiler-core/slang-include-system.h @@ -15,6 +15,7 @@ struct SearchDirectory SearchDirectory(String const& path) : path(path) {} + SearchDirectory& operator=(SearchDirectory const& other) = default; String path; }; diff --git a/source/core/slang-smart-pointer.h b/source/core/slang-smart-pointer.h index c473cca3c..45083c1eb 100644 --- a/source/core/slang-smart-pointer.h +++ b/source/core/slang-smart-pointer.h @@ -285,6 +285,7 @@ namespace Slang TransformablePtr(T* ptr) { *this = ptr; } TransformablePtr(RefPtr<T> ptr) { *this = ptr; } TransformablePtr(const TransformablePtr<T>& ptr) = default; + TransformablePtr<T>& operator=(const TransformablePtr<T>& ptr) = default; void promoteToStrongReference() { m_strongPtr = m_weakPtr; } void demoteToWeakReference() { m_strongPtr = nullptr; } diff --git a/source/slang/slang-check-shader.cpp b/source/slang/slang-check-shader.cpp index 025a47c1b..184ff3350 100644 --- a/source/slang/slang-check-shader.cpp +++ b/source/slang/slang-check-shader.cpp @@ -1180,8 +1180,6 @@ namespace Slang auto genericSpecializationParamCount = getGenericSpecializationParamCount(); SLANG_ASSERT(argCount >= genericSpecializationParamCount); - Result result = SLANG_OK; - RefPtr<EntryPointSpecializationInfo> info = new EntryPointSpecializationInfo(); DeclRef<FuncDecl> specializedFuncDeclRef = m_funcDeclRef; @@ -1226,7 +1224,6 @@ namespace Slang { // TODO: diagnose a problem here sink->diagnose(constraintDecl, Diagnostics::typeArgumentDoesNotConformToInterface, sub, sup); - result = SLANG_FAIL; continue; } } @@ -1263,7 +1260,6 @@ namespace Slang // If no witness was found, then we will be unable to satisfy // the conformances required. sink->diagnose(SourceLoc(), Diagnostics::typeArgumentDoesNotConformToInterface, argType, paramType); - result = SLANG_FAIL; continue; } diff --git a/source/slang/slang-ir-deduplicate.cpp b/source/slang/slang-ir-deduplicate.cpp index 953344850..f2c199af6 100644 --- a/source/slang/slang-ir-deduplicate.cpp +++ b/source/slang/slang-ir-deduplicate.cpp @@ -51,7 +51,6 @@ namespace Slang { DeduplicateContext context; context.builder = this; - bool changed = true; m_constantMap.Clear(); m_globalValueNumberingMap.Clear(); for (auto inst : m_module->getGlobalInsts()) @@ -69,7 +68,6 @@ namespace Slang auto newInst = context.addTypeValue(inst); if (newInst != inst) { - changed = true; inst->replaceUsesWith(newInst); instToRemove.add(inst); } diff --git a/source/slang/slang-ir-lower-generic-call.cpp b/source/slang/slang-ir-lower-generic-call.cpp index dc234bbbc..094baaca1 100644 --- a/source/slang/slang-ir-lower-generic-call.cpp +++ b/source/slang/slang-ir-lower-generic-call.cpp @@ -36,17 +36,13 @@ namespace Slang IRType* paramValType = paramType; IRType* argValType = arg->getDataType(); IRInst* argVal = arg; - bool isParamPointer = false; if (auto ptrType = as<IRPtrTypeBase>(paramType)) { - isParamPointer = true; paramValType = ptrType->getValueType(); } - bool isArgPointer = false; auto argType = arg->getDataType(); if (auto argPtrType = as<IRPtrTypeBase>(argType)) { - isArgPointer = true; argValType = argPtrType->getValueType(); argVal = builder->emitLoad(arg); } diff --git a/source/slang/slang-ir-witness-table-wrapper.cpp b/source/slang/slang-ir-witness-table-wrapper.cpp index e30ecc767..751c4bc21 100644 --- a/source/slang/slang-ir-witness-table-wrapper.cpp +++ b/source/slang/slang-ir-witness-table-wrapper.cpp @@ -42,17 +42,13 @@ namespace Slang IRType* paramValType = paramType; IRType* argValType = arg->getDataType(); IRInst* argVal = arg; - bool isParamPointer = false; if (auto ptrType = as<IRPtrTypeBase>(paramType)) { - isParamPointer = true; paramValType = ptrType->getValueType(); } - bool isArgPointer = false; auto argType = arg->getDataType(); if (auto argPtrType = as<IRPtrTypeBase>(argType)) { - isArgPointer = true; argValType = argPtrType->getValueType(); argVal = builder->emitLoad(arg); } diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp index 466feecf1..bf0b94120 100644 --- a/source/slang/slang-parser.cpp +++ b/source/slang/slang-parser.cpp @@ -4210,6 +4210,7 @@ namespace Slang // when starting to parse an infix expression. // type = nullptr; + SLANG_UNUSED(type); // TODO: If we decide to intermix parsing of statement bodies // with semantic checking (by delaying the parsing of bodies |
