summaryrefslogtreecommitdiffstats
path: root/source/slang/check.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2017-11-04 18:07:09 -0400
committerYong He <yonghe@outlook.com>2017-11-04 18:07:09 -0400
commitd1009d1a5ac7463dc74169ed7c6e1e692b3541d7 (patch)
treeb21cd74ca6daabd655f5a2625c2698de16a92dd1 /source/slang/check.cpp
parent1f9686ce87573efdd4ad56040deb2d424fe51929 (diff)
parent784bd914cface6e5837ef0da7aee0df2e16c4999 (diff)
merge with fixWarnings branch
Diffstat (limited to 'source/slang/check.cpp')
-rw-r--r--source/slang/check.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/slang/check.cpp b/source/slang/check.cpp
index 8e5bab4e5..d01c913b1 100644
--- a/source/slang/check.cpp
+++ b/source/slang/check.cpp
@@ -536,7 +536,7 @@ namespace Slang
bool CoerceToProperTypeImpl(
TypeExp const& typeExp,
RefPtr<Type>* outProperType,
- DiagnosticSink* sink)
+ DiagnosticSink* diagSink)
{
Type* type = typeExp.type.Ptr();
if(!type && typeExp.exp)
@@ -566,11 +566,11 @@ namespace Slang
{
if (!typeParam->initType.exp)
{
- if (sink)
+ if (diagSink)
{
if (!isRewriteMode())
{
- sink->diagnose(typeExp.exp.Ptr(), Diagnostics::unimplemented, "can't fill in default for generic type parameter");
+ diagSink->diagnose(typeExp.exp.Ptr(), Diagnostics::unimplemented, "can't fill in default for generic type parameter");
}
*outProperType = getSession()->getErrorType();
}
@@ -585,11 +585,11 @@ namespace Slang
{
if (!valParam->initExpr)
{
- if (sink)
+ if (diagSink)
{
if (!isRewriteMode())
{
- sink->diagnose(typeExp.exp.Ptr(), Diagnostics::unimplemented, "can't fill in default for generic type parameter");
+ diagSink->diagnose(typeExp.exp.Ptr(), Diagnostics::unimplemented, "can't fill in default for generic type parameter");
}
*outProperType = getSession()->getErrorType();
}
@@ -1580,7 +1580,7 @@ namespace Slang
}
bool doesSignatureMatchRequirement(
- CallableDecl* memberDecl,
+ CallableDecl* /*memberDecl*/,
DeclRef<CallableDecl> requiredMemberDeclRef)
{
// TODO: actually implement matching here. For now we'll
@@ -2088,8 +2088,8 @@ namespace Slang
for (UInt cc = 0; cc < constraintCount; ++cc)
{
- auto fstConstraint = fstConstraints[cc];
- auto sndConstraint = sndConstraints[cc];
+ //auto fstConstraint = fstConstraints[cc];
+ //auto sndConstraint = sndConstraints[cc];
// TODO: the challenge here is that the
// constraints are going to be expressed
@@ -3538,7 +3538,7 @@ namespace Slang
// to `interfaceDeclRef`.
//
SLANG_UNEXPECTED("reflexive type witness");
- //return nullptr;
+ UNREACHABLE_RETURN(nullptr);
}
auto breadcrumbs = inBreadcrumbs;
@@ -3553,7 +3553,7 @@ namespace Slang
// because `A : B` and `B : C` then `A : C`
//
SLANG_UNEXPECTED("transitive type witness");
- //return nullptr;
+ UNREACHABLE_RETURN(nullptr);
}
// Simple case: we have a single declaration
@@ -6157,10 +6157,10 @@ namespace Slang
}
}
- RefPtr<Expr> visitStaticMemberExpr(StaticMemberExpr* expr)
+ RefPtr<Expr> visitStaticMemberExpr(StaticMemberExpr* /*expr*/)
{
SLANG_UNEXPECTED("should not occur in unchecked AST");
- //return expr;
+ UNREACHABLE_RETURN(nullptr);
}
RefPtr<Expr> lookupResultFailure(