From 7420a761a36d7c7c672dff0f0c1e805600ae6d4a Mon Sep 17 00:00:00 2001 From: John Kessenich <cepheus@frii.com> Date: Tue, 9 Jan 2018 21:35:44 -0700 Subject: [PATCH] HLSL: Fix #1215: propagate error on seeing a type name instead of a variable. --- hlsl/hlslGrammar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hlsl/hlslGrammar.cpp b/hlsl/hlslGrammar.cpp index a891b68f1..32b483ad9 100755 --- a/hlsl/hlslGrammar.cpp +++ b/hlsl/hlslGrammar.cpp @@ -3051,6 +3051,8 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node) } if (! peekTokenClass(EHTokLeftParen)) { node = parseContext.handleVariable(idToken.loc, fullName); + if (node == nullptr) + return false; } else if (acceptFunctionCall(idToken.loc, *fullName, node, nullptr)) { // function_call (nothing else to do yet) } else { -- GitLab