|
@@ -307,12 +307,7 @@ Parser::ParseRHSOfBinaryExpression(ExprResult LHS, prec::Level MinPrec) {
|
|
|
Actions.CorrectDelayedTyposInExpr(LHS);
|
|
|
LHS = ExprError();
|
|
|
TernaryMiddle = nullptr;
|
|
|
- } else { // HLSL Change Begin - CorrectDelayedTypos for a? b:c.
|
|
|
- if (LHS.isInvalid()) {
|
|
|
- // Ensure potential typos in the RHS aren't left undiagnosed.
|
|
|
- Actions.CorrectDelayedTyposInExpr(TernaryMiddle);
|
|
|
- }
|
|
|
- } // HLSL Change End.
|
|
|
+ }
|
|
|
} else {
|
|
|
// Special case handling of "X ? Y : Z" where Y is empty:
|
|
|
// logical-OR-expression '?' ':' conditional-expression [GNU]
|
|
@@ -466,6 +461,9 @@ Parser::ParseRHSOfBinaryExpression(ExprResult LHS, prec::Level MinPrec) {
|
|
|
} else
|
|
|
// Ensure potential typos in the RHS aren't left undiagnosed.
|
|
|
Actions.CorrectDelayedTyposInExpr(RHS);
|
|
|
+ // HLSL Change Begin - Take care TernaryMiddle.
|
|
|
+ Actions.CorrectDelayedTyposInExpr(TernaryMiddle);
|
|
|
+ // HLSL Change End.
|
|
|
}
|
|
|
}
|
|
|
|