summaryrefslogtreecommitdiffstats
path: root/source/slang/ir.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/ir.cpp
parent8fe947b2fbbdaa747fb7acc7624d9290bba52086 (diff)
fix all unreachable code warnings
Diffstat (limited to 'source/slang/ir.cpp')
-rw-r--r--source/slang/ir.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/slang/ir.cpp b/source/slang/ir.cpp
index 5cc73a36b..102fb947c 100644
--- a/source/slang/ir.cpp
+++ b/source/slang/ir.cpp
@@ -2540,7 +2540,7 @@ namespace Slang
default:
SLANG_UNEXPECTED("unimplemented");
- return ScalarizedVal();
+ UNREACHABLE_RETURN(ScalarizedVal());
}
}
@@ -3064,7 +3064,7 @@ namespace Slang
default:
SLANG_UNEXPECTED("no value registered for IR value");
- return nullptr;
+ UNREACHABLE_RETURN(nullptr);
}
}
@@ -3401,7 +3401,7 @@ namespace Slang
default:
SLANG_UNEXPECTED("unhandled case");
- return "unknown";
+ UNREACHABLE_RETURN("unknown");
}
}
@@ -3503,7 +3503,7 @@ namespace Slang
{
// This shouldn't happen!
SLANG_UNEXPECTED("no matching function registered");
- return cloneSimpleFunc(context, originalFunc);
+ UNREACHABLE_RETURN(cloneSimpleFunc(context, originalFunc));
}
// We will try to track the "best" definition we can find.
@@ -3733,7 +3733,7 @@ namespace Slang
else
{
SLANG_UNEXPECTED("unimplemented");
- return nullptr;
+ UNREACHABLE_RETURN(nullptr);
}
}