From 46e19015fd1046161f24f315deff0411008eafdb Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 16 Nov 2020 11:18:55 -0800 Subject: Fix VS2017 Warnings (#1602) * Fix VS2017 Warnings * Update slang-visitor.h Co-authored-by: jsmall-nvidia --- source/slang/slang-visitor.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source') diff --git a/source/slang/slang-visitor.h b/source/slang/slang-visitor.h index 25e0aafe4..eef029acc 100644 --- a/source/slang/slang-visitor.h +++ b/source/slang/slang-visitor.h @@ -55,6 +55,12 @@ struct ITypeVisitor SLANG_CHILDREN_ASTNode_Type(SLANG_CLASS_ONLY, SLANG_VISITOR_DISPATCH_DECL) }; +// Suppress VS2017 Unreachable code warning +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable:4702) +#endif + template struct TypeVisitor : Base { @@ -305,6 +311,10 @@ struct ValVisitor : TypeVisitor SLANG_CHILDREN_ASTNode_Val(SLANG_VISITOR_VOID_VISIT_IMPL, _) }; +// Re-activate VS2017 warning settings +#ifdef _MSC_VER +# pragma warning(pop) +#endif } #endif -- cgit v1.2.3