summaryrefslogtreecommitdiffstats
path: root/source/slang/syntax.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2017-11-04 15:37:40 -0400
committerYong He <yonghe@outlook.com>2017-11-04 15:37:40 -0400
commit664e0da8dff1d04860cc46ce8139cbd47e15c552 (patch)
treef5d023e6799d5265d91db2368896c6ad3b51ea4c /source/slang/syntax.cpp
parent8fe947b2fbbdaa747fb7acc7624d9290bba52086 (diff)
fix all unreachable code warnings
Diffstat (limited to 'source/slang/syntax.cpp')
-rw-r--r--source/slang/syntax.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/slang/syntax.cpp b/source/slang/syntax.cpp
index 6cf3fd7c9..149e0b811 100644
--- a/source/slang/syntax.cpp
+++ b/source/slang/syntax.cpp
@@ -761,7 +761,7 @@ void Type::accept(IValVisitor* visitor, void* extra)
bool NamedExpressionType::EqualsImpl(Type * /*type*/)
{
SLANG_UNEXPECTED("unreachable");
- return false;
+ UNREACHABLE_RETURN(false);
}
Type* NamedExpressionType::CreateCanonicalType()
@@ -772,7 +772,7 @@ void Type::accept(IValVisitor* visitor, void* extra)
int NamedExpressionType::GetHashCode()
{
SLANG_UNEXPECTED("unreachable");
- return 0;
+ UNREACHABLE_RETURN(0);
}
// FuncType
@@ -910,7 +910,7 @@ void Type::accept(IValVisitor* visitor, void* extra)
int TypeType::GetHashCode()
{
SLANG_UNEXPECTED("unreachable");
- return 0;
+ UNREACHABLE_RETURN(0);
}
// GenericDeclRefType
@@ -1130,7 +1130,7 @@ void Type::accept(IValVisitor* visitor, void* extra)
SLANG_UNIMPLEMENTED_X("generic substitution into expressions");
- return expr;
+ UNREACHABLE_RETURN(expr);
}
@@ -1308,7 +1308,7 @@ void Type::accept(IValVisitor* visitor, void* extra)
else
{
SLANG_UNEXPECTED("unhandled syntax class name");
- return nullptr;
+ UNREACHABLE_RETURN(nullptr);
}
}