From 664e0da8dff1d04860cc46ce8139cbd47e15c552 Mon Sep 17 00:00:00 2001 From: Yong He Date: Sat, 4 Nov 2017 15:37:40 -0400 Subject: fix all unreachable code warnings --- source/slang/syntax.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/slang/syntax.cpp') 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); } } -- cgit v1.2.3