diff options
| author | Yong He <yonghe@outlook.com> | 2017-11-04 15:37:40 -0400 |
|---|---|---|
| committer | Yong He <yonghe@outlook.com> | 2017-11-04 15:37:40 -0400 |
| commit | 664e0da8dff1d04860cc46ce8139cbd47e15c552 (patch) | |
| tree | f5d023e6799d5265d91db2368896c6ad3b51ea4c /source/core/common.h | |
| parent | 8fe947b2fbbdaa747fb7acc7624d9290bba52086 (diff) | |
fix all unreachable code warnings
Diffstat (limited to 'source/core/common.h')
| -rw-r--r-- | source/core/common.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/core/common.h b/source/core/common.h index dbb837821..3a4543085 100644 --- a/source/core/common.h +++ b/source/core/common.h @@ -43,6 +43,14 @@ namespace Slang #define SLANG_RETURN_NEVER /* empty */ #endif +#ifdef _MSC_VER +#define UNREACHABLE_RETURN(x) +#define UNREACHABLE(x) +#else +#define UNREACHABLE_RETURN(x) return x; +#define UNREACHABLE(x) x; +#endif + SLANG_RETURN_NEVER void signalUnexpectedError(char const* message); } |
