HLSL: Fix #754: recognize type casts in if-statements separately from declarations.
diff --git a/hlsl/hlslGrammar.cpp b/hlsl/hlslGrammar.cpp
index f0d7b72..f88ad3b 100755
--- a/hlsl/hlslGrammar.cpp
+++ b/hlsl/hlslGrammar.cpp
@@ -469,6 +469,12 @@
     if (! acceptFullySpecifiedType(type))
         return false;
 
+    // filter out type casts
+    if (peekTokenClass(EHTokLeftParen)) {
+        recedeToken();
+        return false;
+    }
+
     // identifier
     HlslToken idToken;
     if (! acceptIdentifier(idToken)) {
@@ -3259,7 +3265,7 @@
         TSourceLoc loc = token.loc;
         TIntermTyped* sizeExpr = nullptr;
 
-        // Array sizing expression is optional.  If ommitted, array will be later sized by initializer list.
+        // Array sizing expression is optional.  If omitted, array will be later sized by initializer list.
         const bool hasArraySize = acceptAssignmentExpression(sizeExpr);
 
         if (! acceptTokenClass(EHTokRightBracket)) {