================
@@ -10742,9 +10742,53 @@ static void DiagnoseBadDivideOrRemainderValues(Sema& 
S, ExprResult &LHS,
                             << IsDiv << RHS.get()->getSourceRange());
 }
 
+static void diagnoseScopedEnums(Sema &S, const SourceLocation Loc,
+                                const ExprResult &LHS, const ExprResult &RHS,
+                                BinaryOperatorKind Opc) {
+  const Expr *LHSExpr = LHS.get();
+  const Expr *RHSExpr = RHS.get();
+  if (!LHSExpr || !RHSExpr)
----------------
erichkeane wrote:

Instead of this, do:

`if (!LHS.isUsable() || !RHS.isUsable())` above the .get calls.

https://github.com/llvm/llvm-project/pull/152698
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to